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

storage/mysql: support pre-5.7.20 instances with tx_isolation only #1550

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

bonifaido
Copy link
Member

MySQL 5.7.20 introduced the transaction_isolation system variable, so pre 5.7.20 versions won't work with Dex MySQL storage (like AWS Aurora currently). This PR adds some basic detection logic for those use cases. See #1485 (comment) for more details. Once we can't get rid of the SERIALIZABLE requirement, this logic can be removed.

@bonifaido bonifaido self-assigned this Sep 23, 2019
Copy link
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

LGTM. Haven't tried this, but the code change looks alright.

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

My only concern is whether this is likely to break in the future if that error in particular is reused? Is there any other way to tell about the version and the compatibility we need to configure?

@bonifaido
Copy link
Member Author

We could do a db.Query("SELECT VERSION()") and compare the semantic versions with github.com/coreos/go-semver (that lib is an indirect dependency in the project already).

@bonifaido
Copy link
Member Author

Merging this, for now, later on we can refine this check if any problems occur.

@bonifaido bonifaido merged commit a58d77a into master Oct 30, 2019
@bonifaido bonifaido deleted the mysql-tx-isolation branch October 30, 2019 12: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.

3 participants