storage: don't return WriteTooOld on inline DeleteRange that hits non-inline value#101445
Conversation
kvoli
left a comment
There was a problem hiding this comment.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @jbowens and @nvanbenschoten)
pkg/storage/mvcc.go line 3019 at r1 (raw file):
// versions, so we want to pass these incompatible keys to mvccPutInternal to // detect the condition and return an error. We also scan with the // FailOnMoreRecent set to true. This is not strictly necessary (nothing is
Isn't the MaxTimeStamp only being set below when failOnMoreRecent = false? I got a bit lost on this part of the comment.
Code quote:
// detect the condition and return an error. We also scan with the
// FailOnMoreRecent set to true. This is not strictly necessary (nothing is
// more recent than MaxTimestamp), but it provides added protection against
// the scan returning a WriteTooOld error.…-inline value Fixes cockroachdb#101440. This commit resolves a condition where an inline DeleteRange request could return a WriteTooOld error when encountering a non-inline value, instead of returning the expected assertion error. This could trigger a fatal error in `tryBumpBatchTimestamp`. See the corresponding issue for more details. Note that this is not resolving any condition that could cause an inline DeleteRange request to hit a non-inline value, it's just ensuring that if corruption creates such a condition, we don't fatal. Release note: None
4732cc6 to
ba670ba
Compare
nvb
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @jbowens and @kvoli)
pkg/storage/mvcc.go line 3019 at r1 (raw file):
Previously, kvoli (Austen) wrote…
Isn't the MaxTimeStamp only being set below when
failOnMoreRecent = false? I got a bit lost on this part of the comment.
Nice catch. This was meant to say "FailOnMoreRecent set to false". Done.
kvoli
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @jbowens)
|
bors r=kvoli |
|
Build succeeded: |
Fixes #101440.
This commit resolves a condition where an inline DeleteRange request could return a WriteTooOld error when encountering a non-inline value, instead of returning the expected assertion error. This could trigger a fatal error in
tryBumpBatchTimestamp. See the corresponding issue for more details.Note that this is not resolving any condition that could cause an inline DeleteRange request to hit a non-inline value, it's just ensuring that if corruption creates such a condition, we don't fatal.
Release note: None