Commit 6ae69b0
Fix snapshot retry rewind handling (#657)
When a follower reports RECEIVING_SNAPSHOT, the leader should retry snapshot sync instead of applying the normal append failure rewind.
Rewinding next_log_idx from 1 to 0 causes the next request path to treat the peer progress as uninitialized and reset it to the leader's current next_slot,
which can make create_sync_snapshot_req validate against an impossible last_log_idx.
Keep next_log_idx aligned with the follower response and skip the rewind for RECEIVING_SNAPSHOT so snapshot retry starts from the expected peer progress.
Co-authored-by: yawzhang <yawzhang@ebay.com>
Co-authored-by: Jung-Sang Ahn <jungsang.ahn@gmail.com>1 parent 18a6685 commit 6ae69b0
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1345 | 1345 | | |
1346 | 1346 | | |
1347 | 1347 | | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
1348 | 1352 | | |
1349 | 1353 | | |
1350 | 1354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1417 | 1417 | | |
1418 | 1418 | | |
1419 | 1419 | | |
| 1420 | + | |
1420 | 1421 | | |
1421 | 1422 | | |
1422 | 1423 | | |
| |||
0 commit comments