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

stmtdiagnostics: fix upload in face of transaction retry #106812

Merged

Conversation

stevendanna
Copy link
Collaborator

Previously, the bundle insert transaction would upload an empty bundle
in the face of a transaction retry because it both read from and wrote
to the same slice variable inside the retriable transaction function.

Here, we make a new slice header to track the upload progress, leaving
the original intact in case of retry.

Note that this was caught via synthetic testing and hasn't been seen
in the wild as far as I know.

Epic: none

Release note: None

@stevendanna stevendanna requested review from a team as code owners July 14, 2023 12:44
@stevendanna stevendanna requested review from lidorcarmel and removed request for a team July 14, 2023 12:44
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@stevendanna stevendanna force-pushed the stmt-diagnostic-txn-retry-error branch from 79838cf to cd988b6 Compare July 18, 2023 09:57
Previously, the bundle insert transaction would upload an empty bundle
in the face of a transaction retry because it both read from and wrote
to the same slice variable inside the retriable transaction function.

Here, we make a new slice header to track the upload progress, leaving
the original intact in case of retry.

Note that this was caught via synthetic testing and hasn't been seen
in the wild as far as I know.

Epic: none

Release note: None
@stevendanna stevendanna force-pushed the stmt-diagnostic-txn-retry-error branch from cd988b6 to 70ab058 Compare July 18, 2023 10:13
@stevendanna
Copy link
Collaborator Author

bors r=lidorcarmel

@craig
Copy link
Contributor

craig bot commented Jul 18, 2023

Build succeeded:

@craig craig bot merged commit 3cae059 into cockroachdb:master Jul 18, 2023
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.

3 participants