Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-5608

optimistic_trx causes a query to hang

    XMLWordPrintable

Details

    • MXS-SPRINT-235

    Description

      When optimistic_trx is enabled, the expected response count somehow goes negative and the client hangs.

      13:32:14   info   : (1) (My-Service); > Autocommit: [disabled], trx is [not open], cmd: (0x3) COM_QUERY, plen: 21, type: sql::TYPE_SESSION_WRITE|sql::TYPE_BEGIN_TRX|sql::TYPE_DISABLE_AUTOCOMMIT, stmt: SET autocommit=0
      13:32:14   info   : (1) [readwritesplit] (My-Service); Session write, routing to all servers.
      13:32:14   info   : (1) [readwritesplit] (My-Service); Route query to replica: server1
      13:32:14   info   : (1) [readwritesplit] (My-Service); Route query to replica: server2
      13:32:14   info   : (1) [readwritesplit] (My-Service); Route query to primary: server3
      13:32:14   info   : (1) [readwritesplit] (My-Service); Will return response from 'server3' to the client
      13:32:14   info   : (1) [readwritesplit] (My-Service); Reply complete from 'server2' (OK: 0 warnings)
      13:32:14   info   : (1) [MariaDBProtocol] (My-Service); Added COM_QUERY to history with ID 4: SET autocommit=0 (result: OK)
      13:32:14   info   : (1) [readwritesplit] (My-Service); Reply complete from 'server1', discarding it: OK: 0 warnings
      13:32:14   info   : (1) [readwritesplit] (My-Service); Reply complete from 'server3' (OK: 0 warnings)
      13:32:14   info   : (1) (My-Service); > Autocommit: [disabled], trx is [open], cmd: (0x3) COM_QUERY, plen: 10, type: sql::TYPE_BEGIN_TRX, stmt: BEGIN
      13:32:14   info   : (1) [readwritesplit] (My-Service); Storing query (len: 10 cmd: 3), expecting -1 replies to current command: BEGIN. Would route TARGET_SLAVE to 'server1'.
      13:32:15   info   : (1) [readwritesplit] (My-Service); New COM_QUERY received while query execution is active:  SELECT 1
      13:32:46   info   : (1) [MariaDBProtocol] Client disconnected without sending a COM_QUIT.
      13:32:46   info   : (1) Stopped My-Service client session [1]
      

      The reason appears to be that two responses are returned to the client instead of only one.

      Attachments

        Activity

          People

            markus makela markus makela
            markus makela markus makela
            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.