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

Aurora Single Write Cluster Endpoint can't make Read DB Connection for readonly transaction

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.7.10
    • 2.7.11
    • 2.7 compatibility
    • None
    • aws aurora

    Description

      I am using AWS Aurora DB using a single write cluster endpoint. read only transaction is not executed in read db, but in write db.
      Is the code below intended? It appears that the read db endpoint information obtained from write db cannot be used.

      https://github.com/mariadb-corporation/mariadb-connector-j/blob/32df3852336f372a4d80011b1f0ab466623906a2/src/main/java/org/mariadb/jdbc/internal/protocol/AuroraProtocol.java#L186

      "listener.getUrlParser().getHostAddresses()" always returns only the write cluster endpoint defined in the jdbc url string.

      It seems that the code(inside if statement) below cannot be executed for the same reason as above.

                  if (listener.getUrlParser().getHostAddresses().size() > 1) {
                    // add newly discovered end-point to loop
                    loopAddresses.addAll(listener.getUrlParser().getHostAddresses());
                    // since there is more than one end point, reactivate connection to a read-only host
                    searchFilter = new SearchFilter(false);
                  }
      

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            heesung choi heesung
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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