clusterversion: don't assume BinaryMinSupportedVersionKey is first#96702
clusterversion: don't assume BinaryMinSupportedVersionKey is first#96702craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
The code that applies a "dev offset" to versions assumes that the minimum supported version key is the first (non-primordial) key. This forces us to remove keys when bumping `BinaryMinSupportedVersionKey`. This change improves this code to specifically check for `BinaryMinSupportedVersionKey` so that we can clean up old keys after bumping the min supported version. Release note: None Epic: none
|
Thanks for picking this up! |
|
TFTR! bors r+ |
|
Build succeeded: |
andreimatei
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained
andreimatei
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained
pkg/clusterversion/cockroach_versions.go line 757 at r1 (raw file):
// Note that such upgrades may in fact be a *downgrade* of the logical // version! For example, on a cluster that is on released version 3, a dev // binary containing versions 1, 2, 3, and 4 started with this flag would
I think this comment would now benefit from saying what BinaryMinSupportedVersion is in this example.
pkg/clusterversion/cockroach_versions.go line 762 at r1 (raw file):
// then on to 1000004, etc. for i := range rawVersionsSingleton { // VPrimordial versions are not offset; they don't matter for the logic
Can we delete this stanza about VPrimordial? I think the more general thing this patch does supersedes it.
|
Previously, andreimatei (Andrei Matei) wrote…
TFTR! I'll make these change in my next change in this area. |
The code that applies a "dev offset" to versions assumes that the minimum supported version key is the first (non-primordial) key. This forces us to remove keys when bumping
BinaryMinSupportedVersionKey.This change improves this code to specifically check for
BinaryMinSupportedVersionKeyso that we can clean up old keys after bumping the min supported version.Release note: None
Epic: none