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: initialize failover2 topology monitors after dialect is updated #1198

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

aaron-congo
Copy link
Contributor

Description

  • a bug was occurring when using the failover2 plugin with a multi-az cluster URL. The bug was that regular monitors (ClusterTopologyMonitorImpl) were incorrectly being used instead of multi-az monitors (MultiAZClusterTopologyMonitorImpl). This caused regular topology queries to be executed by the monitor instead of multi-az topology queries, leading to the error Unknown table 'REPLICA_HOST_STATUS' in information_schema.
  • The reason why regular monitors were incorrectly used is that the monitor type depends on the database dialect, and the dialect starts with a default value of Aurora before connecting, and then is updated to a value of multi-az after connecting. The logic to create the monitor was triggered before the dialect was updated, incorrectly resulting in regular monitors. This PR fixes the issue by delaying monitor creation until after the dialect has been updated.

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

Copy link

github-actions bot commented Nov 21, 2024

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

@aaron-congo aaron-congo merged commit ec0a6cc into main Nov 22, 2024
9 of 10 checks passed
@aaron-congo aaron-congo deleted the fix-topology-monitor-init branch November 22, 2024 01:36
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