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

Ajwerner/schemafeed leases rebase #45257

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

ajwerner
Copy link
Contributor

No description provided.

ajwerner and others added 16 commits February 20, 2020 10:56
… scoped leases

This is a very WIP implementation of transaction scoped locks.
The interface is garbage and not very considered.

Nevertheless it seems to mostly work. The biggest problem I see so far is that
at high concurrency there are cases where a lock can lay down all of the
relevant intents and then still fail to commit. This happens because the TS
cache information is lost due to a lease transfer before the txn record is layed
down. Such a possibility is a big problem for the lease use cases which assume
that an intent will be valid until the transaction expires. To some extent this
problem makes sense given the transaction expiration isn't well defined before
the txn record has been written.

Release note: None
- Txn.ForceHeartbeat() writes a transaction record.
- Txn.ExpiryTimestamp() returns the current expiry timestamp.
- TODOs for plumbing a special Intent that updates the ts cache when removed due to abort.

Release note: None
More plumbing for special intent that updates ts cache.
Remaining work is to somehow update the ts cache in cmd_resolve_intent.go
and cmd_resolve_intent_range.go,

Release note: None
Plumbing to update the ts cache when removing a "leasing intent".

Release note: None
Send a struct on success channel.

Release note: None
To be filled.

Release note: None
Adds a pgadvisory.Session object that uses KV-level API to implement
txn- and session-scoped advisory locks.

Release note: None
Also fix some bugs in pgadvisory.Session.

Release note: None
Also add useful information to all pg_advisory builtins.

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg added the X-noremind Bots won't notify about PRs with X-noremind label May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
X-noremind Bots won't notify about PRs with X-noremind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants