-
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
backupccl: don't disable leases in test #92481
Merged
craig
merged 1 commit into
cockroachdb:master
from
stevendanna:avoid-disable-lease-in-tests
Nov 29, 2022
Merged
backupccl: don't disable leases in test #92481
craig
merged 1 commit into
cockroachdb:master
from
stevendanna:avoid-disable-lease-in-tests
Nov 29, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
399e56b introduced a bounded staleness read into the migration machinery. When `lease.TestingDisableTableLeases()` has been set, this bounded staleness read encounters an error: testcluster.go:384: migration-job-find-already-completed: cannot set fixed timestamp, txn "sql txn" meta={id=f4142488 key=/Min pri=0.01688073 epo=0 ts=1669334862.467371575,0 min=1669334862.467371575,0 seq=0} lock=false stat=PENDING rts=1669334862.467371575,0 wto=false gul=1669334862.967371575,0 already performed reads I believe that the read that was already performed in this case was the descriptor lookup. Then, when we go to execute the select, we attempt to SetFixedTimestamp in txn.NegotiateAndSend. When the testing isn't in use, on its face it looks like we don't hit this case because we don't allow a fallback to a store lookup: https://github.com/cockroachdb/cockroach/blob/b5be006bedd7d3cedc3fb3d2248df168e3d64be2/pkg/sql/catalog/descs/leased_descriptors.go#L143-L155 But, when TestingDsiableTableLeases is set, we skip right to the store lookup: https://github.com/cockroachdb/cockroach/blob/b5be006bedd7d3cedc3fb3d2248df168e3d64be2/pkg/sql/catalog/descs/descriptor.go#L489-L491 I haven't looked into why lease.TestingDisableTableLeases() was in place in the past, but it is no longer used in any other backup tests and isn't likely needed here. Fixes cockroachdb#92432 Fixes cockroachdb#92433 Fixes cockroachdb#92434 Fixes cockroachdb#92435 Release note: None
adityamaru
approved these changes
Nov 25, 2022
bors r=adityamaru |
Build failed: |
bors retry |
Build failed: |
bors retry |
Build failed (retrying...): |
Build failed (retrying...): |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
399e56b introduced a bounded staleness read into the migration machinery.
When
lease.TestingDisableTableLeases()
has been set, this bounded staleness read encounters an error:I believe that the read that was already performed in this case was the descriptor lookup. Then, when we go to execute the select, we attempt to SetFixedTimestamp in txn.NegotiateAndSend.
When the testing isn't in use, on its face it looks like we don't hit this case because we don't allow a fallback to a store lookup:
cockroach/pkg/sql/catalog/descs/leased_descriptors.go
Lines 143 to 159 in b5be006
But, when TestingDisableTableLeases is set, we skip right to the store lookup:
cockroach/pkg/sql/catalog/descs/descriptor.go
Lines 489 to 491 in b5be006
I haven't looked into why lease.TestingDisableTableLeases() was in place in the past, but it is no longer used in any other backup tests and isn't likely needed here.
Fixes #92432
Fixes #92433
Fixes #92434
Fixes #92435
Release note: None