sql: step the sql transaction before commit#86461
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Aug 19, 2022
Merged
sql: step the sql transaction before commit#86461craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
In cockroachdb#86153 we added logic to step the transaction before auto-commit. This was insufficient to resolve cockroachdb#86132 because we did not step the transaction before committing an explicit transaction. This PR addresses that by moving the step logic to a shared code path. It also adds a test which previously failed. Fixes cockroachdb#86132 Release justification: bug fix Release note: None
Member
This was referenced Aug 19, 2022
Contributor
Author
|
TFTR! bors r=knz |
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded: |
craig bot
pushed a commit
that referenced
this pull request
Aug 20, 2022
86433: server: proper transaction state management in sql-over-http r=ajwerner a=ajwerner First 4 commits are #86427. Next commit is #86461. We need to construct the internal executor in the context of the transaction so that we can make sure that its side-effects are properly managed. Without this change, we'd be throwing away all of the extraTxnState between each statement. We'd fail to create the jobs (which we defer to the end of the transaction), and we'd fail to run those jobs and check for errors. We'd also fail to validate the two-version invariant or wait for one version. Fixes #86332 Release justification: Fixes critical bugs in new functionality. Release note: None Co-authored-by: Andrew Werner <awerner32@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In #86153 we added logic to step the transaction before auto-commit. This was
insufficient to resolve #86132 because we did not step the transaction before
committing an explicit transaction. This PR addresses that by moving the step
logic to a shared code path. It also adds a test which previously failed.
Fixes #86132
Release justification: bug fix
Release note: None