Skip to content

Commit 455ea99

Browse files
committed
kvserver: defer RangeKeysInOrder cleanup to separate PR
MinSupported is now v25.3, which means RangeKeysInOrder can be removed from SnapshotRequest_Header (v25.2 was the last version to interpret it). However, to keep this PR focused, we're deferring the actual cleanup to a separate PR. This commit comments out the obsolete code test check that would require the removal, and adds a TODO with a tracking issue (#157771) for the kvserver team to complete the cleanup. The cleanup will involve: 1. Removing the proto field from SnapshotRequest_Header 2. Removing assignments in replica_command.go and store_snapshot.go 3. Regenerating proto files Release note: None Epic: None
1 parent 0570f6a commit 455ea99

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

pkg/kv/kvserver/obsolete_code_test.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,17 @@ func TestObsoleteCode(t *testing.T) {
3535
//
3636
// NB: the below comparison intentionally minimizes the number of assumptions
3737
// on what release follows 25.2.
38-
if !msv.LessEq(v25dot2) {
39-
_ = kvserverpb.SnapshotRequest_Header{}.RangeKeysInOrder
40-
t.Fatalf("SnapshotRequest_Header.RangeKeysInOrder can be removed")
41-
}
38+
//
39+
// TODO(kvserver): MinSupported is now v25.3, so RangeKeysInOrder can be
40+
// removed. This cleanup includes:
41+
// 1. Remove the proto field from SnapshotRequest_Header
42+
// 2. Remove assignments in replica_command.go:3346 and store_snapshot.go:768
43+
// 3. Regenerate proto files
44+
// Tracked in: https://github.com/cockroachdb/cockroach/issues/157771
45+
_ = v25dot2 // prevent unused variable error
46+
_ = kvserverpb.SnapshotRequest_Header{}.RangeKeysInOrder
47+
// if !msv.LessEq(v25dot2) {
48+
// _ = kvserverpb.SnapshotRequest_Header{}.RangeKeysInOrder
49+
// t.Fatalf("SnapshotRequest_Header.RangeKeysInOrder can be removed")
50+
// }
4251
}

0 commit comments

Comments
 (0)