server: add TestBumpClusterVersion#57637
Conversation
fd946aa to
1579ad6
Compare
tbg
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @irfansharif, @knz, @tbg, and @TheSamHuang)
pkg/server/migration_test.go, line 101 at r1 (raw file):
} func TestBumpClusterVersion(t *testing.T) {
// TestBumpClusterVersion verifies that the BumpClusterVersion RPC correctly
// persists the cluster version to disk and updates the active in-memory version.
pkg/server/migration_test.go, line 138 at r1 (raw file):
ctx := context.Background() for _, test := range tests {
use subtests here, then you can also defer the stopper.Stop() call. Right now we're leaking goroutines if the test fails.
pkg/server/migration_test.go, line 170 at r1 (raw file):
ClusterVersion: &test.bumpClusterVersion, } if _, err := migrationServer.BumpClusterVersion(ctx, req); err != nil {
Would you mind updating WriteClusterVersion (not in the diff) to take a raw engine, and add a comment that this ensures that the write is synched. Right now it takes a ReadWriter and is thus subject to not syncing automatically when called with, e.g., a batch.
Or, we make them take an explicit batch, deal with all the fallout, and then make sure to Commit(true /* sync */) that batch.
Doesn't have to be in this PR, probably should not.
pkg/server/migration_test.go, line 174 at r1 (raw file):
} // Check to see our post-bump active cluster version is what we expect.
see if our
Tests the machinery that's being used to bump cluster versions during version upgrades. Pulled out of our prototype in cockroachdb#57445. Release note: None
1579ad6 to
0fdb5b5
Compare
|
bors r+ |
|
Build failed: |
|
bors r+ |
|
Build succeeded: |
Tests the machinery that's being used to bump cluster versions during version
upgrades. Pulled out of our prototype in #57445.
Release note: None