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: don't refresh on WriteTooOld flag with non-PENDING status #102960

Merged

Conversation

nvanbenschoten
Copy link
Member

This commit adjusts the txnSpanRefresher to not refresh a transaction's read timestamp when the transaction has its WriteTooOld flag set but it is not PENDING. This is precautionary. It's not clear that this is possible to hit today, but it would be a serous problem if it was, as it could allow us to swallow a commit and then consider a committed transaction to be pending/aborted. It will also become possible if we move the txnSpanRefresher below the txnCommitter in the interceptor stack, which I plan to do as part of supporting Snapshot isolation.

Epic: None
Release note: None

This commit adjusts the `txnSpanRefresher` to not refresh a transaction's
read timestamp when the transaction has its WriteTooOld flag set but it is
not PENDING. This is precautionary. It's not clear that this is possible to
hit today, but it would be a serous problem if it was, as it could allow us
to swallow a commit and then consider a committed transaction to be
pending/aborted. It will also become possible if we move the
`txnSpanRefresher` below the `txnCommitter` in the interceptor stack, which
I plan to do as part of supporting Snapshot isolation.

Epic: None
Release note: None
@nvanbenschoten nvanbenschoten requested a review from arulajmani May 9, 2023 15:52
@nvanbenschoten nvanbenschoten requested a review from a team as a code owner May 9, 2023 15:52
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@arulajmani arulajmani left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)

@nvanbenschoten
Copy link
Member Author

TFTR!

bors r=arulajmani

@craig
Copy link
Contributor

craig bot commented May 11, 2023

Build succeeded:

@craig craig bot merged commit 0c00e43 into cockroachdb:master May 11, 2023
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.

3 participants