[FIXED] Default to allowing binary stream snapshots#7479
Conversation
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
neilalexander
left a comment
There was a problem hiding this comment.
Principally OK with me, with the caveat that this will make one-shot downgrades to 2.9.x or earlier potentially unsafe. Will await @derekcollison's opinion too.
|
include warning from @alexbozhenko branch? a4a17f4 |
derekcollison
left a comment
There was a problem hiding this comment.
LGTM
For downgrade to 2.9, what would actually happen? Can we rebuild and ask for a new one in old style if we do not know what it is?
Binary snapshots have been introduced since 2.10.0, so this PR doesn't change what would happen if binary snapshots exist, but: |
When routes to other servers are established
binarySnapshotsis initially set tofalseindicating it is not supported. Then once aSTATSZis receivedbinarySnapshotswill be updated totrue.Whether this server supports binary snapshots is determined by looping over the peers and checking if other servers don't support it:
However, there's an issue here as the server will shortly think
binarySnapshotsisn't supported and go back to the legacy snapshot which contains interior deletes as a[]uint64which will be disastrous if a stream has a huge amount of interior deletes. Since binary stream snapshots are supported since 2.10.0, we can simply flip thebinarySnapshotsdefault fromfalsetotrue.Alternative to #7476
Signed-off-by: Maurice van Veen github@mauricevanveen.com