feat: Delete Progress.PendingSnapshot and improve snapshot handling#243
feat: Delete Progress.PendingSnapshot and improve snapshot handling#243soma00333 wants to merge 1 commit intoetcd-io:mainfrom
Progress.PendingSnapshot and improve snapshot handling#243Conversation
|
Hi @soma00333. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@ahrtr |
|
cc @joshuazh-x |
|
Thank you for checking this |
|
/retest |
|
@soma00333: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
48b6b6d to
2e13398
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: soma00333 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: soma00333 <soma03432303@gmail.com>
2e13398 to
800cd61
Compare
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Description
This PR addresses #124 by removing the unused
Progress.PendingSnapshotfield and improving snapshot handling in the Raft library.What does this PR do?
Removes
Progress.PendingSnapshotPendingSnapshotfield from theProgressstructImproves
ReportSnapshot()APIappliedSnapshotIndexparameter to track the actual applied snapshot indexnode.goandrawnode.goimplementationsSnapshotFinishwas a no-opEnhances
MsgSnapStatushandlingapplied_snapshot_indexfield to the protobuf messageOnSnapshotApplied()method for cleaner state updatesOptimizes state transitions
StateReplicatewhen follower is caught upStateProbephase when possibleWhy is this needed?
The
PendingSnapshotfield was not being used effectively and added unnecessary complexity to the codebase. This change:Breaking Changes
ReportSnapshot()now requires anappliedSnapshotIndexparameterMsgSnapStatusmessage format has changedTesting
AppliedSnapshotIndexis 0)Related Issues