Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13233

Idle transaction timeouts kills connections rather than transactions

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3
    • N/A
    • Server
    • None

    Description

      Note: Possibly it's just a documentation issue; if it is so, please switch the category.

      If idle_transaction_timeout or its siblings are set, and the timeout is exceeded, not only the open transaction closes, but the entire session (connection) gets dropped.

      MDEV-11418 (KILL IDLE TRANSACTIONS) only speaks about killing transactions; documentation is even less verbose in this regard, but it also only mentions transactions; finally, the tests in pull request, although they enable reconnect and thus apparently expect the connection to be lost, do not show it specifically.

      Killing the entire session seems to be excessive for the declared goal, but if it has to be so, please document it properly. The difference in semantics is similar to KILL <id> vs KILL QUERY <id>, and it is essential for setting up proper workflow and tuning applications which might be affected by the timeouts.

      MTR test case

      --connect (con1,localhost,root,,)
      set idle_transaction_timeout= 2;
      --enable_reconnect
      BEGIN;
      SELECT CONNECTION_ID();
      --sleep 3
      --error 2006,2013
      SELECT "Dead";
      SELECT CONNECTION_ID();
      --disconnect con1
      

      Actual result

      connect  con1,localhost,root,,;
      set idle_transaction_timeout= 2;
      BEGIN;
      SELECT CONNECTION_ID();
      CONNECTION_ID()
      5
      SELECT "Dead";
      Got one of the listed errors
      SELECT CONNECTION_ID();
      CONNECTION_ID()
      6
      disconnect con1;
      

      Attachments

        Issue Links

          Activity

            People

              greenman Ian Gilfillan
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.