Skip to content
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

sql/catalog/lease: wait until the descriptor is visible at now #99965

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

ajwerner
Copy link
Contributor

In MR serverless, we're making the lease table a global table. We want to make sure we wait until new leases will find the newest version, lest we drop leases at the current version and then have to re-acquire, and, worse, hit the uncertainty interval.

Epic: none

Release note: None

In MR serverless, we're making the lease table a global table. We want to make
sure we wait until new leases will find the newest version, lest we drop leases
at the current version and then have to re-acquire, and, worse, hit the
uncertainty interval.

Epic: none

Release note: None
@ajwerner ajwerner requested a review from a team March 29, 2023 19:08
@blathers-crl
Copy link

blathers-crl bot commented Mar 29, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

desc.GetID(), desc.GetName(), err)
}
}
// New descriptors may appear in the future if the descriptor table is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the table's modification time can be in the future? It's because the clock difference between regions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the way that global tables work. They write in the future ✨ . https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20200811_non_blocking_txns.md

Copy link
Contributor

@chengxiong-ruan chengxiong-ruan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ajwerner
Copy link
Contributor Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 31, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 31, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 31, 2023

Build succeeded:

@craig craig bot merged commit 41581c3 into cockroachdb:master Mar 31, 2023
@knz
Copy link
Contributor

knz commented Apr 2, 2023

should this be backported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants