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

kv: all leases start as expiration based #101765

Conversation

andrewbaptist
Copy link
Collaborator

Starting a lease as an epoch lease is risky. The problem is the lease may be marked as transferred to the new node, but the node can take time to realize it is the leaseholder. THis was partially addressed as part of #85629, however there were still cases where this can occur. Specifically in the cases of non-cooperative lease acquisition. While we don't have an example of this causing a problem because the range is likely idle at this point, it is certainly possible to make a contrived case where this happens.

Epic: none

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@andrewbaptist andrewbaptist force-pushed the 2023-04-18-only-transfer-expiration-lease branch from 8e9d89f to 2eb4d19 Compare April 18, 2023 17:46
@blathers-crl
Copy link

blathers-crl bot commented Apr 18, 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.

The metrics are a little confusing since they are measured as a delta
since the last time the call is made in some cases, but in other cases
they seem to be cumulative. Need to figure this out more still....
@andrewbaptist andrewbaptist force-pushed the 2023-04-18-only-transfer-expiration-lease branch 4 times, most recently from cdd7850 to 477efa5 Compare April 19, 2023 20:08
Starting a lease as an epoch lease is risky. The problem is the lease
may be marked as transferred to the new node, but the node can take time
to realize it is the leaseholder. THis was partially addressed as part
of cockroachdb#85629, however there were still cases where this can occur.
Specifically in the cases of non-cooperative lease acquisition. While
we don't have an example of this causing a problem because the range is
likely idle at this point, it is certainly possible to make a contrived
case where this happens.

Epic: none

Release note: None
@andrewbaptist andrewbaptist force-pushed the 2023-04-18-only-transfer-expiration-lease branch from 477efa5 to 7a4fb36 Compare April 19, 2023 21:05
@andrewbaptist andrewbaptist deleted the 2023-04-18-only-transfer-expiration-lease branch December 18, 2023 21:21
@andrewbaptist andrewbaptist restored the 2023-04-18-only-transfer-expiration-lease branch December 21, 2023 17:13
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.

2 participants