release-20.1: kvserver: don't panic on wto after committed txn #51843
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.
Backport 1/1 commits from #51619.
/cc @cockroachdb/release
In #50317 we're getting reports of an assertion firing telling us that a
transaction has moved to the STAGING or COMMITTED state but there's also
a WriteTooOldError to return to the client. This seems bad, and I can't
figure out how it happens. EndTxn, which moves the txn to these states,
is supposed to notice the WriteTooOld field on the baHeader.Txn and not
do that transition. All the reports seem to be in the context of
UPSERTs.
This patch changes the assertion from a Fatal to just a sentry report,
and includes more info in the report. The hope is that this turns out to
be benign, related to the STAGING state.
Touches #50317
Release note: An unknown condition previously crash with the message
"committed txn with writeTooOld err" now no longer crashes a node;
instead an error message is printed to the logs asking for help in the
investigation.