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

release-19.1: storage/engine: fix re-issued KV writes with most recent seq num #43942

Merged

Conversation

@nvanbenschoten
Copy link
Member

nvanbenschoten commented Jan 13, 2020

Backport 1/1 commits from #43937.

/cc @cockroachdb/release


Fixes #43928.

This commit fixes a bug in MVCCMetadata.GetPrevIntentSeq that was present
since its inception (a147f24). The method was failing to properly look up
the previous intent sequence when the last sequence in the sequence history
should have been returned. This could cause errors for read-write KV ops
like CPut, InitPut, and Increment.

This commit does not need to land on master because it was already fixed
there by f6a4dc5. It will need to end up on release-19.1 as well though.

Release note (bug fix): A SQL row write that is re-issued after
already succeeding will no longer throw a duplicate key error when
the previous write in its transaction deleted the row.

Fixes #43928.

This commit fixes a bug in `MVCCMetadata.GetPrevIntentSeq` that was present
since its inception (a147f24). The method was failing to properly look up
the previous intent sequence when the last sequence in the sequence history
should have been returned. This could cause errors for read-write KV ops
like CPut, InitPut, and Increment.

This commit does not need to land on master because it was already fixed
there by f6a4dc5. It will need to end up on release-19.1 as well though.

Release note (bug fix): A SQL row write that is re-issued after
already succeeding will no longer throw a duplicate key error when
the previous write in its transaction deleted the row.
@nvanbenschoten nvanbenschoten requested review from itsbilal and knz Jan 13, 2020
@cockroach-teamcity

This comment has been minimized.

Copy link
Member

cockroach-teamcity commented Jan 13, 2020

This change is Reviewable

@knz
knz approved these changes Jan 14, 2020
@nvanbenschoten nvanbenschoten merged commit 67be21c into cockroachdb:release-19.1 Jan 14, 2020
2 checks passed
2 checks passed
GitHub CI (Cockroach) TeamCity build finished
Details
license/cla Contributor License Agreement is signed.
Details
@nvanbenschoten nvanbenschoten deleted the nvanbenschoten:backport19.1-43937 branch Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.