Skip to content

allow setting transaction isolation#3102

Merged
sougou merged 3 commits intovitessio:masterfrom
HubSpot:tx_isolation
Aug 24, 2017
Merged

allow setting transaction isolation#3102
sougou merged 3 commits intovitessio:masterfrom
HubSpot:tx_isolation

Conversation

@bbeaudreault
Copy link
Copy Markdown
Contributor

@sougou this is as we discussed -- vttablet enforces by executing set transaction isolation level before each Begin, when value is non-default. See https://dev.mysql.com/doc/refman/5.7/en/set-transaction.html

I think this is all it takes, let me know if you think I missed something.

Copy link
Copy Markdown
Contributor

@sougou sougou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. A few nits.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be renamed to querypb "github....

I have a patch you can apply to goimports to do this automatically: https://gist.github.com/sougou/2255bc77bf8eaa45eadcc44f8832514f

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to use a map[querypb.ExecuteOptions]string here. We could even map it to the full statement, thereby avoiding the Sprintf.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use querypb

@bbeaudreault
Copy link
Copy Markdown
Contributor Author

@sougou fixed, PTAL

@bbeaudreault
Copy link
Copy Markdown
Contributor Author

Not sure why make proto didn't generate the python the first time, but should be fixed now.

@sougou
Copy link
Copy Markdown
Contributor

sougou commented Aug 24, 2017

LGTM

Approved with PullApprove

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