Skip to content

Commit 5446eec

Browse files
committed
kvserver: extend TestStoreRangeMergeRaftSnapshot
This patch extends TestStoreRangeMergeRaftSnapshot to create a version where the RHS is rebalanced away to different nodes. As a reminder, the test previously created a scenario where a replica learned about a bunch of merges and a split via a snapshot, and validated that it caught up correctly. We now extend the test to run a variant where the RHS is rebalanced away, validating that the RHS replica's on-disk state isn't leaked when catching up via the snapshot. This test passes as is, and shows that the hazard described in #73462 is only possible if there hasn't been a merge. See clearSubsumedReplicaDiskData for the logic that handles this case. Epic: none Release note: None
1 parent 89685c6 commit 5446eec

File tree

3 files changed

+401
-358
lines changed

3 files changed

+401
-358
lines changed

pkg/kv/kvserver/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ go_test(
576576
"@com_github_stretchr_testify//require",
577577
"@org_golang_google_grpc//:grpc",
578578
"@org_golang_google_grpc//metadata",
579+
"@org_golang_x_exp//maps",
579580
"@org_golang_x_sync//errgroup",
580581
"@org_golang_x_sync//syncmap",
581582
],

0 commit comments

Comments
 (0)