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

Pool : galera validation

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.1.0
    • Failover
    • None
    • Sprint connector/j 2.1.0

    Description

      JDBC Connection.valid() implementation execute a COM_PING, indicating that socket is OK.

      When connecting a Galera server in non-primary state:

      • Connection can be established
      • Connection.valid() will validate that socket is ok, with a COM_PING.

      When a master become non-primary, a SQLException will be thrown for any INSERT or SELECT (if variable wsrep_dirty_reads is false), problem is all other connection is pool are still considered valid until having these kind of query.

      Goal is to permit that pool discard those connection with the standard JDBC Connection.valid() verification, and avoid connect to non primary server when driver is configured with multi-master configuration.

      When driver use multi-master configuration, when establishing the connection, or validating the connection, driver must ensure that if wsrep_cluster_status variable exists, it's set to PRIMARY
      When this occur, server must be blacklisted (Driver will try to reconnect only if no other master are found, or after a certain amount of time).

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            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.