-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage: remove unused TxnSpanGCThreshold key #38817
storage: remove unused TxnSpanGCThreshold key #38817
Conversation
1fcd522
to
c40c8ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1, 24 of 24 files at r2.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @nvanbenschoten)
pkg/storage/replica_test.go, line 3390 at r2 (raw file):
func TestTxnRecordUnderTxnSpanGCThreshold(t *testing.T) { defer leaktest.AfterTest(t)() t.Skip("WIP")
Reminder
pkg/storage/replica_test.go, line 7862 at r2 (raw file):
tc.Start(t, stopper) for _, keyThresh := range []hlc.Timestamp{{}, hlc.Timestamp{}.Add(1, 0)} {
useless nit, but you can write {Logical:1}
here for the second element in the slice.
pkg/storage/store_test.go, line 2890 at r2 (raw file):
} clusterVersion := s.ClusterSettings().Version.Version().Version
Cue snarky comment by @andreimatei
c40c8ac
to
0a9f2e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @andreimatei and @tbg)
pkg/storage/replica_test.go, line 3390 at r2 (raw file):
Previously, tbg (Tobias Grieger) wrote…
Reminder
Done.
pkg/storage/replica_test.go, line 7862 at r2 (raw file):
Previously, tbg (Tobias Grieger) wrote…
useless nit, but you can write
{Logical:1}
here for the second element in the slice.
Done.
pkg/storage/store_test.go, line 2890 at r2 (raw file):
Previously, tbg (Tobias Grieger) wrote…
Cue snarky comment by @andreimatei
Done.
Merge conflict |
…TOO_OLD This was never used in v19.1, so we can remove it now. Release note: None
0a9f2e0
to
20b41f5
Compare
This was never used in v19.1, so we can remove it now. It was replaced by using to the timestamp cache to provide the same protection against GCed transaction records being re-written. See 1bf315d. The corresponding key is still replicated, so we have to be a little careful about continuing to keep it consistent across replicas. Luckily, this doesn't require too much care because any changes to the key are coordinated above Raft. v19.1 nodes will continue to include updates to the key in replicated write batches, which v19.2 nodes will unknowingly apply to update their durable state. v19.2 nodes will stop updating the key entirely and will never include changes to it in replicated write batches or ReplicatedEvalResults. The key was left in a few places, including in `pkg/keys`. This serves both as a placeholder to ensure that the key prefix is never re-used and allows us to continue to debug clusters with old TxnSpanGCThreshold keys lying around. The decision was made not to add a migration to actually delete the key on old clusters. It takes up a negligible amount of space and deleting it is not necessary for the migration. Release note: None
20b41f5
to
eeecc92
Compare
bors r+ |
38817: storage: remove unused TxnSpanGCThreshold key r=nvanbenschoten a=nvanbenschoten This was never used in v19.1, so we can remove it now. It was replaced by using to the timestamp cache to provide the same protection against GCed transaction records being re-written. See 1bf315d. The corresponding key is still replicated, so we have to be a little careful about continuing to keep it consistent across replicas. Luckily, this doesn't require too much care because any changes to the key are coordinated above Raft. v19.1 nodes will continue to include updates to the key in replicated write batches, which v19.2 nodes will unknowingly apply to update their durable state. v19.2 nodes will stop updating the key entirely and will never include changes to it in replicated write batches or ReplicatedEvalResults. The key was left in a few places, including in `pkg/keys`. This serves both as a placeholder to ensure that the key prefix is never re-used and allows us to continue to debug clusters with old TxnSpanGCThreshold keys lying around. The decision was made not to add a migration to actually delete the key on old clusters. It takes up a negligible amount of space and deleting it is not necessary for the migration. Co-authored-by: Nathan VanBenschoten <[email protected]>
Build succeeded |
Completes the migration started in cockroachdb#38817 and partially preserved in cockroachdb#39003. This needed to wait for v20.1. Release note: None
Completes the migration started in cockroachdb#38817 and partially preserved in cockroachdb#39003. This needed to wait for v20.1. Release note: None
43328: storage: delete ReplicaState.DeprecatedTxnSpanGCThreshold r=nvanbenschoten a=nvanbenschoten Completes the migration started in #38817 and partially preserved in #39003. This needed to wait for v20.1. Release note: None Co-authored-by: Nathan VanBenschoten <[email protected]>
This was never used in v19.1, so we can remove it now. It was replaced by using to the timestamp cache to provide the same protection against GCed transaction records being re-written. See 1bf315d.
The corresponding key is still replicated, so we have to be a little careful about continuing to keep it consistent across replicas. Luckily, this doesn't require too much care because any changes to the key are coordinated above Raft. v19.1 nodes will continue to include updates to the key in replicated write batches, which v19.2 nodes will unknowingly apply to update their durable state. v19.2 nodes will stop updating the key entirely and will never include changes to it in replicated write batches or ReplicatedEvalResults.
The key was left in a few places, including in
pkg/keys
. This serves both as a placeholder to ensure that the key prefix is never re-used and allows us to continue to debug clusters with old TxnSpanGCThreshold keys lying around.The decision was made not to add a migration to actually delete the key on old clusters. It takes up a negligible amount of space and deleting it is not necessary for the migration.