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

NoLock config option for mysql driver #439

Merged
merged 2 commits into from
Sep 9, 2020

Conversation

antonklava
Copy link

Skipping GET_LOCK/RELEASE_LOCK is useful when running MySQL as
multi-master. This change simply disables the locking.

The internal client lock is left in place as a sanity check.

Fixes #215

Skipping `GET_LOCK`/`RELEASE_LOCK` is useful when running MySQL as
multi-master. This change simply disables the locking.

The internal client lock is left in place as a sanity check.
@coveralls
Copy link

coveralls commented Sep 8, 2020

Pull Request Test Coverage Report for Build 859

  • 15 of 15 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 53.867%

Totals Coverage Status
Change from base Build 856: 0.1%
Covered Lines: 2779
Relevant Lines: 5159

💛 - Coveralls

Copy link
Member

@dhui dhui left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Just one minor change.

database/mysql/mysql.go Outdated Show resolved Hide resolved
database/mysql/README.md Show resolved Hide resolved
`strconv.ParseBool` should ensure that if x-no-lock is set to any
non-booleanic value an error is returned. The parameter still
defaults to false.
@antonklava
Copy link
Author

Thanks for the PR! Just one minor change.

Thanks for the review and maintaining this!

@antonklava antonklava requested a review from dhui September 9, 2020 11:55
@dhui dhui merged commit 6819a17 into golang-migrate:master Sep 9, 2020
@antonklava antonklava deleted the add-mysql-no-lock branch September 10, 2020 08:02
@cyberhck
Copy link

Tanks for this PR @antonklava , we're using vitess and it doesn't have locking (it probably has its reasons), and I had to disable locking for my projects

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.

Option to skip locking
4 participants