Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-584

Connector setReadOnly silently fails if aurora cluster URL is a DNS CNAME

    XMLWordPrintable

Details

    Description

      Spent several days figuring out why my Aurora read replicas weren't getting any traffic. Realized that even after calling setReadOnly(true) on the Connection, isReadOnly() returned false immediately after (with no logging or error to indicate why), and all traffic went to master. I had to debug into the depths of the driver code to find AuroraListener:77 that hard -codes the expected URL pattern for a cluster.

      However, in our case, we have friendly CNAME's for the two cluster endpoints (e.g., "myapp-writer.example.com" and "myapp-reader.example.com"). I know there's already a bug entered about being able to specify the cluster "ro" endpoint (CONJ-565), so this might be related. In any case, I would imagine the driver, once given any endpoint (regardless of specific URL pattern), might be able to query the DB to get the entire shape of the cluster.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            AlexAtLeanPath Alex Dommasch
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.