plinux, this patch looks interesting, but could you elaborate a few things:
why wait_timeout didn't work for you?
why do you need separate timeouts for read-only and read-write transactions? What is the common setting for those?
why do you need additional trx_idle_timeout?
why trx_idle_timeout has higher priority than more specific trx_readonly_idle_timeout and trx_changes_idle_timeout?
per my understanding these 3 new idle timeouts have longer effect than one may expect, e.g. if transaction is committed but no subsequent statement received yet. Right?
Sergey Vojtovich
added a comment - plinux , this patch looks interesting, but could you elaborate a few things:
why wait_timeout didn't work for you?
why do you need separate timeouts for read-only and read-write transactions? What is the common setting for those?
why do you need additional trx_idle_timeout?
why trx_idle_timeout has higher priority than more specific trx_readonly_idle_timeout and trx_changes_idle_timeout?
per my understanding these 3 new idle timeouts have longer effect than one may expect, e.g. if transaction is committed but no subsequent statement received yet. Right?
Idle transaction means the transaction is started and done some operations, but forget to query a COMMIT or ROLLBACK.
Wait_timeout can't sovle this problem.
Because for InnoDB, readonly transaction needn't to get any locks (MVCC), so maybe users can accept longer run time.
But for INSERT/DELETE or other write operations, the transaction will hold some locks, so usually the users can't accept it runs a long time.
So we need 2 different timeout option.
And trx_idle_timeout is a higher priority option, if users can accept the readonly and non-readonly transactions use the same timeout number, then it can use this option.
Lixun Peng
added a comment - svoj
Idle transaction means the transaction is started and done some operations, but forget to query a COMMIT or ROLLBACK.
Wait_timeout can't sovle this problem.
Because for InnoDB, readonly transaction needn't to get any locks (MVCC), so maybe users can accept longer run time.
But for INSERT/DELETE or other write operations, the transaction will hold some locks, so usually the users can't accept it runs a long time.
So we need 2 different timeout option.
And trx_idle_timeout is a higher priority option, if users can accept the readonly and non-readonly transactions use the same timeout number, then it can use this option.
plinux, alright I agree different timeouts for read-only and read-write transactions are useful. Per my understanding one of options is to adjust wait_timeout before every transaction, but it requires application changes and is not acceptable for you.
Still I don't completely understand a few implementation things:
after I do just "BEGIN" wait_timeout applies, which is more or less alright. Correct?
after I do "BEGIN; SET ..." wait_timeout applies, which is more or less alright. Correct?
after I do "BEGIN; INSERT...; COMMIT;" trx_changes_idle_timeout applies (because nobody restored it to wait_timeout), which looks confusing. Correct?
I'm fine about having trx_idle_timeout as a fallback for trx_readonly_idle_timeout and trx_changes_idle_timeout, but I think the fact that it has higher priority is confusing. Will it work for you if we prefer setting of trx_readonly_idle_timeout and trx_changes_idle_timeout over trx_idle_timeout?
Sergey Vojtovich
added a comment - plinux , alright I agree different timeouts for read-only and read-write transactions are useful. Per my understanding one of options is to adjust wait_timeout before every transaction, but it requires application changes and is not acceptable for you.
Still I don't completely understand a few implementation things:
after I do just "BEGIN" wait_timeout applies, which is more or less alright. Correct?
after I do "BEGIN; SET ..." wait_timeout applies, which is more or less alright. Correct?
after I do "BEGIN; INSERT...; COMMIT;" trx_changes_idle_timeout applies (because nobody restored it to wait_timeout), which looks confusing. Correct?
I'm fine about having trx_idle_timeout as a fallback for trx_readonly_idle_timeout and trx_changes_idle_timeout, but I think the fact that it has higher priority is confusing. Will it work for you if we prefer setting of trx_readonly_idle_timeout and trx_changes_idle_timeout over trx_idle_timeout?
svoj
It's OK, we need just to define a priority level, whether we define trx_idle_timeout has a higher priority or the other two options have higher priority is OK for me.
We just need to have these options to adjust transaction timeout.
Lixun Peng
added a comment - svoj
It's OK, we need just to define a priority level, whether we define trx_idle_timeout has a higher priority or the other two options have higher priority is OK for me.
We just need to have these options to adjust transaction timeout.
New variables added:
idle_transaction_timeout
idle_readonly_transaction_timeout
idle_readwrite_transaction_timeout
Otherwise it is similar to original patch.
Sergey Vojtovich
added a comment - New variables added:
idle_transaction_timeout
idle_readonly_transaction_timeout
idle_readwrite_transaction_timeout
Otherwise it is similar to original patch.
People
Sergey Vojtovich
Sergey Vojtovich
Votes:
0Vote for this issue
Watchers:
3Start 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.
{"report":{"fcp":998.8000001907349,"ttfb":355.5,"pageVisibility":"visible","entityId":59128,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"e4f8dd45-ffe2-4134-8fd1-fd2172917bc5","navigationType":0,"readyForUser":1081.1000003814697,"redirectCount":0,"resourceLoadedEnd":726.8000001907349,"resourceLoadedStart":361.30000019073486,"resourceTiming":[{"duration":32.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":361.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":361.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":393.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":32.200000286102295,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":361.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":361.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":393.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":228.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":361.80000019073486,"connectEnd":361.80000019073486,"connectStart":361.80000019073486,"domainLookupEnd":361.80000019073486,"domainLookupStart":361.80000019073486,"fetchStart":361.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":398.80000019073486,"responseEnd":590.3000001907349,"responseStart":413.30000019073486,"secureConnectionStart":361.80000019073486},{"duration":364.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":361.90000009536743,"connectEnd":361.90000009536743,"connectStart":361.90000009536743,"domainLookupEnd":361.90000009536743,"domainLookupStart":361.90000009536743,"fetchStart":361.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":402.7000002861023,"responseEnd":726.8000001907349,"responseStart":418.2000002861023,"secureConnectionStart":361.90000009536743},{"duration":60.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":362.1000003814697,"connectEnd":362.1000003814697,"connectStart":362.1000003814697,"domainLookupEnd":362.1000003814697,"domainLookupStart":362.1000003814697,"fetchStart":362.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":403.6000003814697,"responseEnd":423,"responseStart":419.80000019073486,"secureConnectionStart":362.1000003814697},{"duration":61.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":362.40000009536743,"connectEnd":362.40000009536743,"connectStart":362.40000009536743,"domainLookupEnd":362.40000009536743,"domainLookupStart":362.40000009536743,"fetchStart":362.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":405.1000003814697,"responseEnd":423.5,"responseStart":420.90000009536743,"secureConnectionStart":362.40000009536743},{"duration":60.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":362.6000003814697,"connectEnd":362.6000003814697,"connectStart":362.6000003814697,"domainLookupEnd":362.6000003814697,"domainLookupStart":362.6000003814697,"fetchStart":362.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":404.7000002861023,"responseEnd":423.2000002861023,"responseStart":420.40000009536743,"secureConnectionStart":362.6000003814697},{"duration":36.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":362.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":362.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":398.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":60.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":362.90000009536743,"connectEnd":362.90000009536743,"connectStart":362.90000009536743,"domainLookupEnd":362.90000009536743,"domainLookupStart":362.90000009536743,"fetchStart":362.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":406.1000003814697,"responseEnd":423.7000002861023,"responseStart":421.5,"secureConnectionStart":362.90000009536743},{"duration":37.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":363.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":363.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":400.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":63.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":363.2000002861023,"connectEnd":363.2000002861023,"connectStart":363.2000002861023,"domainLookupEnd":363.2000002861023,"domainLookupStart":363.2000002861023,"fetchStart":363.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":406.5,"responseEnd":426.80000019073486,"responseStart":424.2000002861023,"secureConnectionStart":363.2000002861023},{"duration":307.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":364.2000002861023,"connectEnd":364.2000002861023,"connectStart":364.2000002861023,"domainLookupEnd":364.2000002861023,"domainLookupStart":364.2000002861023,"fetchStart":364.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":454.7000002861023,"responseEnd":671.4000000953674,"responseStart":665.6000003814697,"secureConnectionStart":364.2000002861023},{"duration":306.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":368.7000002861023,"connectEnd":368.7000002861023,"connectStart":368.7000002861023,"domainLookupEnd":368.7000002861023,"domainLookupStart":368.7000002861023,"fetchStart":368.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":497.30000019073486,"responseEnd":675.3000001907349,"responseStart":669.3000001907349,"secureConnectionStart":368.7000002861023},{"duration":182.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":734.6000003814697,"connectEnd":734.6000003814697,"connectStart":734.6000003814697,"domainLookupEnd":734.6000003814697,"domainLookupStart":734.6000003814697,"fetchStart":734.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":882.3000001907349,"responseEnd":916.7000002861023,"responseStart":914.3000001907349,"secureConnectionStart":734.6000003814697}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":126,"responseStart":356,"responseEnd":361,"domLoading":359,"domInteractive":1141,"domContentLoadedEventStart":1142,"domContentLoadedEventEnd":1190,"domComplete":1696,"loadEventStart":1696,"loadEventEnd":1697,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1115.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1116.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1116.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1118.6000003814697},{"name":"activityTabFullyLoaded","time":1249.3000001907349}],"measures":[],"correlationId":"5c3b109d3578ee","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":152,"dbReadsTimeInMs":28,"dbConnsTimeInMs":46,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
plinux, this patch looks interesting, but could you elaborate a few things: