-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
release-22.1: spanconfig,kvserver: teach the GC job to respect tenant PTS records #78389
release-22.1: spanconfig,kvserver: teach the GC job to respect tenant PTS records #78389
Conversation
Release note: None Release justification: fixes for high-priority bugs in existing functionality
This change teaches the GC job responsible for ClearRange'ing a tenants data to respect protected timestamp records written by the system tenant covering the secondary tenant's keyspace. Specifically, once the tenants row data has expired, the GC job now checks for protected timestamp records that have been written by the system tenant targetting that particular tenant, or targetting its entire keyspace i.e. all secondary tenants. If the record is protecting a time less than the drop time of the tenant then the GC will be delayed. This is important because a system tenant may be backing up the secondary tenant or all secondary tenants while the secondary tenant has been dropped. We don't want the GC job to ClearRange the tenant's data until the backup that wrote the PTS record on the tenant's keyspace has completed (backed up the tenant data) and released the record. This change also consolidates all tenant GC related tests into one file. The only new test is `TestGCTenantJobWaitsForProtectedTimestamps`. Release note (enterprise change): Tenant GC job will now wait for protected timestamp records targetting the tenant, and with a protect time less than the tenant's drop time. Release justification: high-priority changes in existing functionality
16277cc
to
9dc9536
Compare
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @adityamaru and @arulajmani)
Backport 2/2 commits from #77726 on behalf of @adityamaru.
/cc @cockroachdb/release
This change teaches the GC job responsible for ClearRange'ing a tenants
data to respect protected timestamp records that are protecting a tenants
data. Specifically, once the tenants row data has expired, the GC job now
checks for protected timestamp records that have been written by the system
tenant targetting that particular tenant, or targetting its entire keyspace
i.e. all secondary tenants. If the record is protecting a time less than the
drop time of the tenant then the GC will be delayed.
This change also consolidates all tenant GC related tests into one file. The only
new test is
TestGCTenantJobWaitsForProtectedTimestamps
.Release note (enterprise change): Tenant GC job will now wait for protected
timestamp records targetting the tenant, and with a protect time less than
the tenant's drop time.
Release justification: high-priority changes in existing functionality
Fixes: #77239
Release justification: