storage: don't return status error on rollbacks#28344
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Aug 8, 2018
Merged
storage: don't return status error on rollbacks#28344craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
7a92171 to
9dcd64a
Compare
9dcd64a to
3192d52
Compare
benesch
approved these changes
Aug 8, 2018
bdarnell
approved these changes
Aug 8, 2018
Contributor
bdarnell
left a comment
There was a problem hiding this comment.
Reviewed 4 of 4 files at r1.
Reviewable status:complete! 0 of 0 LGTMs obtained
nvb
approved these changes
Aug 8, 2018
Contributor
Author
|
bors r+
…On Wed, Aug 8, 2018 at 10:50 AM Nathan VanBenschoten < ***@***.***> wrote:
***@***.**** approved this pull request.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#28344 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAXBcctaO-AmmPpD-xToIuUM56q_GT_wks5uOvqpgaJpZM4VyobT>
.
|
Contributor
Build failed |
Before this patch, EndTransaction(commit=false) would return TransactionStatusError if the txn record was not found (just like a commit). This patch makes it return success (and an unmodified txn proto in the response). The motivation is that the client is routinely sending rollbacks in situations where it's unclear whether the txn record has previously been written successfully. We currently mostly swallow those errors on the client, but that code is ugly and incomplete - the client sometimes turn commits into rollbacks if all writes have been performed at an old epoch. In that case we have a problem because, if the rollback encouters the error, we might not have the responses for other requests in its batch. So, I will take the client out of the business of massaging these errors. Release note: none
3192d52 to
408f335
Compare
andreimatei
commented
Aug 8, 2018
Contributor
Author
andreimatei
left a comment
There was a problem hiding this comment.
bors r+
Reviewable status:
complete! 0 of 0 LGTMs obtained
craig bot
pushed a commit
that referenced
this pull request
Aug 8, 2018
28344: storage: don't return status error on rollbacks r=andreimatei a=andreimatei Before this patch, EndTransaction(commit=false) would return TransactionStatusError if the txn record was not found (just like a commit). This patch makes it return success (and an unmodified txn proto in the response). The motivation is that the client is routinely sending rollbacks in situations where it's unclear whether the txn record has previously been written successfully. We currently mostly swallow those errors on the client, but that code is ugly and incomplete - the client sometimes turn commits into rollbacks if all writes have been performed at an old epoch. In that case we have a problem because, if the rollback encouters the error, we might not have the responses for other requests in its batch. So, I will take the client out of the business of massaging these errors. Release note: none Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
Contributor
Build succeeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this patch, EndTransaction(commit=false) would return
TransactionStatusError if the txn record was not found (just like a
commit). This patch makes it return success (and an unmodified txn proto
in the response).
The motivation is that the client is routinely sending rollbacks in
situations where it's unclear whether the txn record has previously been
written successfully. We currently mostly swallow those errors on the
client, but that code is ugly and incomplete - the client sometimes turn
commits into rollbacks if all writes have been performed at an old
epoch. In that case we have a problem because, if the rollback encouters
the error, we might not have the responses for other requests in its
batch. So, I will take the client out of the business of massaging
these errors.
Release note: none