Snapshot Segment Mismatch
I'm aware that this is likely an implementation issue on my part, but do you have any hint on what could explain an error like this when installing a snapshot.
Failed to install snapshot "snapshot segment id mismatch, expect: snapshot-257+0, got: snapshot-257+39845888"
I haven't reproduced this consistently yet, but I'm working on it. I've this error with earlier versions of async_raft. I know it happens with large snapshots but I don't know yet whether there's a threshold. Any pointers would be appreciated.
👋 Thanks for opening this issue!
Get help or engage by:
/help: to print help messages./assignme: to assign this issue to you.
It looks like there is a retransmit of a snapshot segment.
The follower/learner has finished installing a snapshot and has cleaned up the session by setting RaftCore.snapshot_state to None.
But the leader did not wait long enough for the follower/learner to respond. Then the leader retransmitted a segment.
To confirm that, you need to check the debug level log to see if there are a retransmitted snapshot segment. The debug logging statement is:
// Send the RPC over to the target.
tracing::debug!(
snapshot_size = req.data.len(),
req.offset,
end,
req.done,
"sending snapshot chunk"
);