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

fastMode fails with MySQL and Hikari and AutoCommit=true #158

Closed
rbygrave opened this issue Jul 2, 2024 · 0 comments · Fixed by #159
Closed

fastMode fails with MySQL and Hikari and AutoCommit=true #158

rbygrave opened this issue Jul 2, 2024 · 0 comments · Fixed by #159
Assignees
Labels
Milestone

Comments

@rbygrave
Copy link
Member

rbygrave commented Jul 2, 2024

Refer to ebean-orm/ebean#3434

When MigrationRunner executes with:

  • Hikari Connection Pool (it does not reproduce with ebean-datasource)
  • AutoCommit = true
  • MySQL (Due to Hikari treatment of the SQLException thrown with MySQL error codes)
  • No actual migrations have run yet (this is expected)

... then we can reproduce this error.

The fastMode can fail (as expected) but the bug is that is performs connection.rollback() regardless of the AutoCommit mode [and it only should when autoCommit=false]. Hikari connection pool then reads the MySQL SQLException and infers that the connection is broken and should be evicted (imo this is a Hikari bug, using the ebean-datasource this issue doesn't reproduce).

@rbygrave rbygrave added the bug label Jul 2, 2024
@rbygrave rbygrave self-assigned this Jul 2, 2024
@rbygrave rbygrave added this to the 14.2.0 milestone Jul 2, 2024
rbygrave added a commit that referenced this issue Jul 2, 2024
#158 - fastMode fails with MySQL and Hikari and AutoCommit=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant