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

sql: add more info to advanceInfo #22367

Merged
merged 1 commit into from
Feb 8, 2018

Conversation

andreimatei
Copy link
Contributor

advanceInfo is the structure produced by the connection state machine
when processing events. Its main purpose is to tell the connExecutor
what statement to execute next (the next one, the same one again, jump
to the next batch). This patch add another nugget of information - a
"transaction event" telling the connEx if a couple of things happened to
the SQL transaction as a result of the state machine event that was just
processed. The idea is that these txn events will be used to know if we
should run or clear transactional state maintained by the connEx, such
as the schema changes. The txn events can be seen as a much-distilled
version of the state machine events, much more suitable for consumption
by the connEx.

Release note: None

@andreimatei andreimatei requested review from a team February 4, 2018 16:45
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@andreimatei
Copy link
Contributor Author

extracted from #22277

advanceInfo is the structure produced by the connection state machine
when processing events. Its main purpose is to tell the connExecutor
what statement to execute next (the next one, the same one again, jump
to the next batch). This patch add another nugget of information - a
"transaction event" telling the connEx if a couple of things happened to
the SQL transaction as a result of the state machine event that was just
processed. The idea is that these txn events will be used to know if we
should run or clear transactional state maintained by the connEx, such
as the schema changes. The txn events can be seen as a much-distilled
version of the state machine events, much more suitable for consumption
by the connEx.

Release note: None
@knz
Copy link
Contributor

knz commented Feb 5, 2018

:lgtm:


Reviewed 5 of 5 files at r1.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@nvanbenschoten
Copy link
Member

The code here LGTM, but I'm still not sure why we're setting txnState on advanceInfo. What decisions is the state going to help inform?


Reviewed 2 of 5 files at r1.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@andreimatei
Copy link
Contributor Author

I believe I got a verbal LGTM for the N-man. Merging.


Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@andreimatei andreimatei merged commit b0e21be into cockroachdb:master Feb 8, 2018
@andreimatei andreimatei deleted the conn-fsm-txn-event branch February 8, 2018 03:14
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