Skip to content

sql: add more info to advanceInfo#22367

Merged
andreimatei merged 1 commit intocockroachdb:masterfrom
andreimatei:conn-fsm-txn-event
Feb 8, 2018
Merged

sql: add more info to advanceInfo#22367
andreimatei merged 1 commit intocockroachdb:masterfrom
andreimatei:conn-fsm-txn-event

Conversation

@andreimatei
Copy link
Copy Markdown
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
Copy Markdown
Member

This change is Reviewable

@andreimatei
Copy link
Copy Markdown
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
Copy Markdown
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

@nvb
Copy link
Copy Markdown
Contributor

nvb commented Feb 5, 2018

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
Copy Markdown
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