-
Notifications
You must be signed in to change notification settings - Fork 49
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
Remove the isMultiWriterCluster flag from the AuroraTopologyService #405
Remove the isMultiWriterCluster flag from the AuroraTopologyService #405
Conversation
null : previousTopology.get(FailoverConnectionPlugin.WRITER_CONNECTION_INDEX); | ||
|
||
// There is potentially a stale record. Do not add it to the hosts list. | ||
if (writerCount == 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if it's more than 2 writers found? Like few stale writer records. Is it possible to process all stale records and keep the latest one?
@@ -1055,7 +1055,8 @@ ConnectionProperties.useAwsIam=Set to true to use AWS IAM database authenticatio | |||
|
|||
AuroraTopologyService.1=[AuroraTopologyService] clusterId=''{0}'' | |||
AuroraTopologyService.2=[AuroraTopologyService] clusterInstance host=''{0}'', port={1,number,#}, database=''{2}'' | |||
AuroraTopologyService.3=[AuroraTopologyService] The topology query returned an invalid topology - no writer instance detected | |||
AuroraTopologyService.3=[AuroraTopologyService] The topology query returned an invalid topology - no writer instance detected. | |||
AuroraTopologyService.4=[AuroraTopologyService] The topology query returned an invalid topology - multi-writer is not supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like a message we no longer need. Everything related to multi-writers should go.
a5615c0
to
480805c
Compare
57ffae1
to
6270dd2
Compare
} else { | ||
// Store the first writer to its expected position [0]. If there are other writers or stale records, ignore them. | ||
// ResultSet and writers list is already ordered by latest updated after querying with RETRIEVE_TOPOLOGY_SQL. | ||
hosts.add(FailoverConnectionPlugin.WRITER_CONNECTION_INDEX, writers.get(0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
writers.get(0) may contain not the latest writer node. I think we still need to sort writers collection by last updated date.
Summary
Remove the isMultiWriterCluster flag from the AuroraTopologyService
Description
Multi writer clusters are not longer supported, so the isMultiWriterCluster flag that was used to disable failover has been removed. Additionally, checks have been added to ensure stale writer records that are obtained post writer-failover are not being used.
Additional Reviewers