Skip to content

Comments

Set a transaction isolation level for MySQL connections#1156

Merged
timvaillancourt merged 6 commits intogithub:masterfrom
timvaillancourt:set-trx-isolation
Aug 12, 2022
Merged

Set a transaction isolation level for MySQL connections#1156
timvaillancourt merged 6 commits intogithub:masterfrom
timvaillancourt:set-trx-isolation

Conversation

@timvaillancourt
Copy link
Collaborator

@timvaillancourt timvaillancourt commented Jul 30, 2022

Related issue: #1155

Description

This PR resolves #1155 by defining a connection-level transaction isolation level when setting up new MySQL connections. I also moved connection params to a slice that's joined into a string later-on because the giant params string was getting pretty unreadable. I also moved cases of log.Fatalf with no tokens to log.Fatal 🧹

At this time REPEATABLE_READ is used as the isolation for all connections following a discussion here: #1155

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

@timvaillancourt timvaillancourt requested review from a user and rashiq July 30, 2022 21:31
@timvaillancourt
Copy link
Collaborator Author

Hmm works on my laptop, fails in CI. More soon! 🤔

@timvaillancourt timvaillancourt force-pushed the set-trx-isolation branch 2 times, most recently from 26948cd to 4820212 Compare August 10, 2022 22:05
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@timvaillancourt timvaillancourt merged commit 3f44e04 into github:master Aug 12, 2022
@timvaillancourt timvaillancourt deleted the set-trx-isolation branch August 12, 2022 16:52
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.

gh-ost does not define a transaction isolation level

1 participant