Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11418 AliSQL: [Feature] Issue#1 KILL IDLE TRANSACTIONS
  3. MDEV-13759

Document correlation between idle_transaction_timeout, idle_readonly_transaction_timeout and idle_readwrite_transaction_timeout

Details

    • Technical task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • Documentation
    • None

    Description

      The KB only provides formal definitions of the variables, but does not explain which one is used where, especially idle_transaction_timeout vs the other two.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova added a comment - FYI greenman
            greenman Ian Gilfillan added a comment -

            These variables do not behave as I expected, and I am not sure if this is intentional. Please review the following before I use as the basis for documentation:

            1) idle_transaction_timeout only
            Transactions that have reads, have writes, or no activity all time out (as expected)

            2) idle_readonly_transaction_timeout only
            Transactions that have reads, or no activity, time out, transactions with writes do not (as expected)

            3) idle_readwrite_transaction_timeout_only
            Transactions that have writes time out (expected), but transactions that have reads or no activity do not time out (unexpected for me, and contrary to what the documentation in the code seems to indicate.)

            4) idle_transaction_timeout and idle_readonly_transaction_timeout
            Transactions that have reads or no activity time out according to the idle_readonly_transaction_timeout setting, whether it's higher or lower (contrary to what the original Alibaba patch states, that idle_transaction_timeout has a higher priority (https://github.com/alibaba/AliSQL/commit/68d6a67a7f93e25c9b4e0bc42445878b1433b2a5)

            5) idle_transaction_timeout and idle_readwrite_transaction_timeout
            Transactions that have writes time out according to the idle_readwrite_transaction_timeout setting, whether it's higher or lower (contrary to what the original Alibaba patch states, that idle_transaction_timeout has a higher priority (https://github.com/alibaba/AliSQL/commit/68d6a67a7f93e25c9b4e0bc42445878b1433b2a5)

            6) idle_readwrite_transaction_timeout and idle_readonly_transaction_timeout
            As expected according to the above, these do no interfere with each other, readwrite only affecting write transactions, readonly only affecting read transactions.

            If the above is intentional, I would suggest renaming idle_readwrite_transaction_timeout to idle_write_transaction_timeout.

            greenman Ian Gilfillan added a comment - These variables do not behave as I expected, and I am not sure if this is intentional. Please review the following before I use as the basis for documentation: 1) idle_transaction_timeout only Transactions that have reads, have writes, or no activity all time out (as expected) 2) idle_readonly_transaction_timeout only Transactions that have reads, or no activity, time out, transactions with writes do not (as expected) 3) idle_readwrite_transaction_timeout_only Transactions that have writes time out (expected), but transactions that have reads or no activity do not time out (unexpected for me, and contrary to what the documentation in the code seems to indicate.) 4) idle_transaction_timeout and idle_readonly_transaction_timeout Transactions that have reads or no activity time out according to the idle_readonly_transaction_timeout setting, whether it's higher or lower (contrary to what the original Alibaba patch states, that idle_transaction_timeout has a higher priority ( https://github.com/alibaba/AliSQL/commit/68d6a67a7f93e25c9b4e0bc42445878b1433b2a5 ) 5) idle_transaction_timeout and idle_readwrite_transaction_timeout Transactions that have writes time out according to the idle_readwrite_transaction_timeout setting, whether it's higher or lower (contrary to what the original Alibaba patch states, that idle_transaction_timeout has a higher priority ( https://github.com/alibaba/AliSQL/commit/68d6a67a7f93e25c9b4e0bc42445878b1433b2a5 ) 6) idle_readwrite_transaction_timeout and idle_readonly_transaction_timeout As expected according to the above, these do no interfere with each other, readwrite only affecting write transactions, readonly only affecting read transactions. If the above is intentional, I would suggest renaming idle_readwrite_transaction_timeout to idle_write_transaction_timeout.

            3 is intentional, it is only supposed for transactions that modified persistent data. Internally transaction enters read-write state after first write (before that it is assumed read-only). I'm not sure if renaming idle_readwrite_transaction_timeout to idle_write_transaction_timeout is correct here, probably serg could comment.

            4 and 5 are intentional and was agreed with Lixun: https://jira.mariadb.org/browse/MDEV-11418?focusedCommentId=92046&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-92046

            Somehow I missed to update revision comment, so it looks misleading. Sorry about that.

            svoj Sergey Vojtovich added a comment - 3 is intentional, it is only supposed for transactions that modified persistent data. Internally transaction enters read-write state after first write (before that it is assumed read-only). I'm not sure if renaming idle_readwrite_transaction_timeout to idle_write_transaction_timeout is correct here, probably serg could comment. 4 and 5 are intentional and was agreed with Lixun: https://jira.mariadb.org/browse/MDEV-11418?focusedCommentId=92046&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-92046 Somehow I missed to update revision comment, so it looks misleading. Sorry about that.

            idle_write_transaction_timeout looks ok. It's not "idle_writeonly_transaction_timeout" — that would be confusing.

            serg Sergei Golubchik added a comment - idle_write_transaction_timeout looks ok. It's not "idle_writeonly_transaction_timeout" — that would be confusing.
            greenman Ian Gilfillan added a comment - Documented at https://mariadb.com/kb/en/library/transaction-timeouts/
            greenman Ian Gilfillan added a comment -

            I've created a separate issue for the suggested rename at MDEV-13855

            greenman Ian Gilfillan added a comment - I've created a separate issue for the suggested rename at MDEV-13855

            People

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