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: provide session variable to allow for FOR UPDATE locks to be replicated #89111

Closed
ajwerner opened this issue Sep 30, 2022 · 1 comment
Closed
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@ajwerner
Copy link
Contributor

ajwerner commented Sep 30, 2022

Is your feature request related to a problem? Please describe.

This tracks the idea that in some cases, it is desirable for FOR UPDATE locks to be durable. This will reduce the chance for a client to unknowingly lose a lock (though it will not fully eliminate that chance if either the transaction coordinator or the client itself is partitioned or aborted, perhaps due to deadlock or a higher-priority pusher).

Describe the solution you'd like
Add a session variable which allows FOR UPDATE locks to lead to a durable lock being replicated.

Additional context
There are a few problems with this:

  1. We already don't wait for replication in the common case because we find transaction pipelining is important
  2. Work to buffer writes is going to avoid replicating locks (IIUC).

Jira issue: CRDB-20123

@ajwerner ajwerner added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Sep 30, 2022
@nvanbenschoten
Copy link
Member

Replacing with #100193, which is a more general issue describing the same ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

2 participants