decouple olap tx timeout from oltp tx timeout#10946
decouple olap tx timeout from oltp tx timeout#10946harshit-gangal merged 15 commits intovitessio:mainfrom
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
b6d5c70 to
a7801e5
Compare
|
@maxenglander we'll get this reviewed. Can you add notes to the 15_0_0_summary.md file and resolve the conflicts in the meantime? |
27c7708 to
b908164
Compare
5f9ad61 to
98b3941
Compare
…t, +sc.expiryTime Signed-off-by: Max Englander <max@planetscale.com>
…or expiryTime Signed-off-by: Max Englander <max@planetscale.com>
Signed-off-by: Max Englander <max@planetscale.com>
harshit-gangal
left a comment
There was a problem hiding this comment.
Other things mostly looks good.
I think we should add more tests for Idle transaction getting killed by transaction killer and expiry time getting updated when we swtich workload.
We might have those tests already, just check atleast.
| tp.txComplete(conn, tx.TxKill) | ||
| } | ||
| conn.Releasef("exceeded timeout: %v", tp.Timeout()) | ||
| conn.Releasef("exceeded timeout: %v", timeout) |
There was a problem hiding this comment.
nit: can use conn.timeout directly here in the method.
There was a problem hiding this comment.
Oops sorry I didn't implement this suggestion earlier. I saw it, but I misunderstood it 🤦
…fix comments, set ticks interval once Signed-off-by: Max Englander <max@planetscale.com>
f083308 to
4885ab7
Compare
Signed-off-by: Max Englander <max@planetscale.com>
4885ab7 to
17e7b7f
Compare
Signed-off-by: Max Englander <max@planetscale.com>
Signed-off-by: Max Englander <max@planetscale.com>
Signed-off-by: Max Englander <max@planetscale.com>
Signed-off-by: Max Englander <max@planetscale.com>
|
@harshit-gangal I implemented the one outstanding suggestion I found ( |
Description
Since
workload=olapbypasses the query timeouts(
--queryserver-config-query-timeout) and also row limits, the naturalassumption is that it also bypasses the transaction timeout.
This is not the case, e.g. for a tablet where the
--queryserver-config-transaction-timeoutis 10.This PR
timeouts for OLAP workloads
--queryserver-config-olap-transaction-timeoutwith a default value of0seconds, disabling OLAP TX timeouts.Decouples TX kill interval from OLTP TX timeout via new CLI flag andYAML field
--queryserver-config-transaction-killer-intervaldefaulting to3seconds.One subtlety is that the timeout that is applied to the transaction is based on the value of the workload setting at the beginning of the transaction. If the workload is changed mid-transaction, that may change the timeout applied to queries within the transaction, but it won't change the transaction timeout.
Demo
Using (new) default values), connected to VTGate.
Breaking changes
Currently OLAP transactions are killed after--queryserver-config-transaction-timeoutseconds. With this PR, OLAP transactions are killed after--queryserver-config-olap-transaction-timeoutseconds (default value0means transactions are not timed out).Currently OLTP and OLAP transactions are evaluated for killing every--queryserver-config-transaction-timeoutseconds divided by10. With this PR, OLAP and OLTP transactions are evaluated for killing every--queryserver-config-transaction-killer-intervalseconds.Related Issue(s)
#10945
Checklist
Deployment Notes