When digging into
SOLR-10126. I found a case that can make peerSync fail.
- leader and replica receive update from 1 to 4
- replica stop
- replica miss updates 5, 6
- replica start recovery
- replica buffer updates 7, 8
- replica request versions from leader,
- in the same time leader receive update 9, so it will return updates from 1 to 9 (for request versions) when replica get recent versions ( so it will be 1,2,3,4,5,6,7,8,9 )
- replica do peersync and request updates 5, 6, 9 from leader
- replica apply updates 5, 6, 9. Its index does not have update 7, 8 and maxVersionSpecified for fingerprint is 9, therefore compare fingerprint will fail
- relates to
SOLR-10126 PeerSyncReplicationTest is a flakey test.
SOLR-15655 tweak PeerSync(WithLeader) debug logging