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

fix: commit transaction after topology query (fixes #1168) #1169

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

finalchild
Copy link

Summary

This PR tries to fix #1168, where queryForTopology automatically fired by FailOverPlugin opens a transaction and never closes, resulting in an unexpected change in the connection state.

Description

If the connection doesn't auto-commit and wasn't in a transaction already, queryForTopology leaves a new transaction open. We have to either commit or roll back the transaction.

Note that this PR is a suggestion merely based on a speculation. I haven't tested that this works, nor do I fully understand the meaning of this.hostListProviderService.isInTransaction(). Please review and close/edit as you see fit.

Additional Reviewers

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@aaron-congo
Copy link
Contributor

Hi @finalchild, I believe the fix for this has been merged already (see here). Are you okay with me closing this PR?

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.

Unexpected Transaction State Error on Repeated setReadOnly Calls in AWS Aurora Wrapper
2 participants