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.
FYI greenman