AliSQL: [Feature] Issue#1 KILL IDLE TRANSACTIONS (MDEV-11418)

[MDEV-13759] Document correlation between idle_transaction_timeout, idle_readonly_transaction_timeout and idle_readwrite_transaction_timeout Created: 2017-09-07  Updated: 2017-09-20  Resolved: 2017-09-20

Status: Closed
Project: MariaDB Server
Component/s: Documentation
Affects Version/s: N/A
Fix Version/s: N/A

Type: Technical task Priority: Major
Reporter: Elena Stepanova Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-13855 Rename idle_readwrite_transaction_tim... Closed

 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.



 Comments   
Comment by Elena Stepanova [ 2017-09-07 ]

FYI greenman

Comment by Ian Gilfillan [ 2017-09-08 ]

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.

Comment by Sergey Vojtovich [ 2017-09-18 ]

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.

Comment by Sergei Golubchik [ 2017-09-18 ]

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

Comment by Ian Gilfillan [ 2017-09-20 ]

Documented at https://mariadb.com/kb/en/library/transaction-timeouts/

Comment by Ian Gilfillan [ 2017-09-20 ]

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

Generated at Thu Feb 08 08:08:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.