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

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

Conversation

nvanbenschoten
Copy link
Member

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 cockroachdb#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.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

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

:lgtm: , thanks for adding the test for just this function too!

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @knz and @rohany)

Copy link
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

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

thanks

@nvanbenschoten nvanbenschoten merged commit f03b083 into cockroachdb:release-19.2 Jan 13, 2020
@nvanbenschoten
Copy link
Member Author

TFTRs!

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.

4 participants