Fix: Aurora Connection Tracker invalidates the incorrect host after failover #428
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Integration Test Run
https://github.com/Bit-Quill/aws-advanced-jdbc-wrapper/actions/runs/4878201119
Issues
Issue 1 Solution
Issue one is caused by the following check.
We need to remove the check for
PROMOTED_TO_WRITERIssue 2 Solution
The tracker plugin calls
invalidateAllConnectionsin 2 locations, in one of the location it passes the original connection url toinvalidateAllConnections. If the url is a cluster endpoint the plugin will look up its aliases and pick the first instance endpoint it finds.This is a problem if the cluster has gone through many changes and has several instance endpoints in the aliases:
Extra Information: Logs observed
Before Failover
After Failover
New writer = instance-5
Changes detected
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.