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

server: proper transaction state management in sql-over-http #86433

Merged
merged 2 commits into from
Aug 20, 2022

Conversation

ajwerner
Copy link
Contributor

@ajwerner ajwerner commented Aug 19, 2022

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

@ajwerner ajwerner requested a review from a team August 19, 2022 03:16
@ajwerner ajwerner requested a review from a team as a code owner August 19, 2022 03:16
@ajwerner ajwerner requested a review from a team August 19, 2022 03:16
@ajwerner ajwerner requested review from a team as code owners August 19, 2022 03:16
@ajwerner ajwerner requested review from stevendanna and removed request for a team August 19, 2022 03:16
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ajwerner ajwerner force-pushed the ajwerner/fix-sql-over-http branch 3 times, most recently from 2651443 to 89feebd Compare August 19, 2022 06:04
@ajwerner
Copy link
Contributor Author

@rafiss or @knz can you review the last commit on this one (and feel empowered to review #86427 in the process)?

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.

Last commit LGTM.

I did not review the others.

Reviewed 3 of 3 files at r6, 2 of 2 files at r7, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @stevendanna)

This is needed both to ensure that the transactions which
purposefully use the internal executor can avoid the halloween
problem and so that we can use a default QoS level for those
transaction.

Release justification: part of a bug fix

Release note: None
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 cockroachdb#86332

Release justification: Fixes critical bugs in new functionality.

Release note: None
@ajwerner
Copy link
Contributor Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 20, 2022

Build succeeded:

@craig craig bot merged commit 17266af into cockroachdb:master Aug 20, 2022
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.

multiple schema changes on same request don't work on SQL over http api
3 participants