-
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
catalog/lease: deflake TestLeaseAtLatestVersion #139497
Conversation
65ed92a
to
9b293a5
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @fqazi)
pkg/sql/catalog/lease/lease_test.go
line 1161 at r1 (raw file):
s := srv.ApplicationLayer() // This test relies on the initial version not being acquired. if _, err := sqlDB.Exec("SET CLUSTER SETTING sql.catalog.descriptor_wait_for_initial_version.enabled=false"); err != nil {
out of curiosity, how much work would it be to make this test work with this setting enabled?
8b9c426
to
230ce05
Compare
Currently, TestLeaseAtLatestVersion can flake when the initial version of a descriptor is acquired, which this test is not designed to handle. To address this, this patch will intentionally use a different database for the timestamp table, so that publishing a new version or a slow range feed does not acquire the kv table in the same schema. Fixes: cockroachdb#139386 Release note: None
230ce05
to
29d1a6b
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @rafiss)
pkg/sql/catalog/lease/lease_test.go
line 1161 at r1 (raw file):
Previously, rafiss (Rafi Shamim) wrote…
out of curiosity, how much work would it be to make this test work with this setting enabled?
Done.
Fair point, and a simpler workaround is to just put timestamp in its own schema. The initial version is fetched because the schema gets leased by the insert, breaking the assumptions of the test
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.
nice fix!
Reviewable status: complete! 0 of 0 LGTMs obtained
@rafiss TFTR! bors r+ |
bors r+ |
Currently, TestLeaseAtLatestVersion can flake when the initial version
of a descriptor is acquired, which this test is not designed to handle.
To address this, this patch will intentionally use a different database
for the timestamp table, so that publishing a new version or a slow
range feed does not acquire the kv table in the same schema.
Fixes: #139386
Release note: None