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

kvclient: corrrectly handle WriteTooOld error in read committed in txnWriteBuffer #143497

Open
stevendanna opened this issue Mar 26, 2025 · 0 comments
Labels
A-buffered-writes Related to the introduction of buffered writes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team

Comments

@stevendanna
Copy link
Collaborator

stevendanna commented Mar 26, 2025

The buffered writes project decomposes some requests into a locking get and a buffered write request. This scheme requires the locking get to provide isolation through commit time. At the moment we use unreplicated locks for this case which can still be lost in some cases.

If a write sneaks in underneath us we will still detect this in a read-committed transaction when we go to flush the batch. But, we need to carefully handle the resulting WriteTooOld error in this case. Unlike a normal RC transaction, a write buffered RC transaction cannot arbitrarily move the WriteTimestamp of the request forward because this could result in what would appear to users as single-statement write skew, which we don't currently allow.

Jira issue: CRDB-48875

@stevendanna stevendanna added A-buffered-writes Related to the introduction of buffered writes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team labels Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-buffered-writes Related to the introduction of buffered writes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team
Projects
None yet
Development

No branches or pull requests

1 participant