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
relates to
MDEV-13855Rename idle_readwrite_transaction_timeout to idle_write_transaction_timeout
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.
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.
Somehow I missed to update revision comment, so it looks misleading. Sorry about that.
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.
FYI greenman