Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix raftexample possible idempotent-problem #16438

Conversation

chenyang8094
Copy link
Contributor

@chenyang8094 chenyang8094 commented Aug 18, 2023

issue ref: #16425

I know that the current kvstore does not have idempotence problems (even if the wal log is replayed multiple times), because it uses a map structure (key value). But I think raftexample should fully consider this scenario. Just like the etcd server, by maintaining a consistentIndex in the db to avoid the idempotence problem of replaying wal.

@chenyang8094 chenyang8094 force-pushed the fix-raftexample-possible-idempotent-problem branch 4 times, most recently from 4846854 to 629024b Compare August 18, 2023 12:59
@chenyang8094 chenyang8094 force-pushed the fix-raftexample-possible-idempotent-problem branch from 629024b to 394bd0f Compare August 18, 2023 13:06
@ahrtr
Copy link
Member

ahrtr commented Aug 18, 2023

Thanks for the PR.

So please do not spend too much effort to improve raftexample. Instead, if you have bandwidth and be interested, please help to resolve etcd-io/raft#2

@chenyang8094
Copy link
Contributor Author

chenyang8094 commented Aug 18, 2023

Thanks for the PR.

So please do not spend too much effort to improve raftexample. Instead, if you have bandwidth and be interested, please help to resolve etcd-io/raft#2

I see. Although the raftexample is just one example, it may actually be more important than we think. In my work, I have seen many projects using raft based on raftexample. There are also countless articles on the Internet analyzing raftexample. The reason is that raftexample is indeed a simple and effective way to learn how to use etcd/raft. Therefore, I think that raftexample should show the precautions when using etcd-raft library as much as possible, and provide more help to everyone who is looking at this project. I just took a little time to work out the little imperfection I got.

As for the issue etcd-io/raft#2 , I will continue to pay attention, thank you.

Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 17, 2024
@jmhbnz
Copy link
Member

jmhbnz commented Jun 6, 2024

Discussed during sig-etcd triage meeting. Given we are moving raftexample suggest we close this pr. @ahrtr do you agree?

@stale stale bot removed the stale label Jun 6, 2024
@ahrtr ahrtr closed this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants