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

Aurora Read Replica with Cluster endpoint Kill Query Fail.

    XMLWordPrintable

Details

    Description

      I'm using Aurora. When using two or more multi replica read db, a problem occurs when sending a kill query when query timeout occurs.
      The problem occurs because of Aurora's cluster endpoint policy. Aurora provides a cluster endpoint for read db load balance, and the cluster endpoint's IP connected to DNS changes sequentially.
      MariaDB Driver sends a kill query using domain. As a result, a situation occurs where a kill query may be sent to a db other than the db where the actual query is performed.

      To solve this problem, I request that the kill query be sent to the IP rather than the domain.

      [orginal code]
      https://github.com/mariadb-corporation/mariadb-connector-j/blob/28f1269b0df58cd87fbb4fa3e44021e440e34c2f/src/main/java/org/mariadb/jdbc/internal/protocol/AbstractQueryProtocol.java#L1365C29-L1365C29

      I request changes as shown below.

      copiedProtocol.setHostAddress(new HostAddress(this.getSocket().getInetAddress().getCanonicalHostName(), this.getHostAddress().port, this.getHostAddress().type));

      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.