is much better indicator than Seconds_behind_master.
1000 seconds behind can mean single long running transaction whereas 15 seconds behind can mean 40 transactions behind. A DBA could be concerned more about slave lag of 40 transactions than about 1 transaction lag. This will also allow for better alerts by monitoring tools.
Alexander Keremidarski
added a comment - In my humble opinion a message like:
"N transactions behind the master"
is much better indicator than Seconds_behind_master.
1000 seconds behind can mean single long running transaction whereas 15 seconds behind can mean 40 transactions behind. A DBA could be concerned more about slave lag of 40 transactions than about 1 transaction lag. This will also allow for better alerts by monitoring tools.
Andrei Elkin
added a comment - bnestere , salle , as noted practically (thanks to pandi.gurusamy who pointed to that) we have had this feature in form of
GTIDs_behind_master = ShowSlaveStatus::Gtid_IO_Pos - @@global.gtid_slave_pos
I'd close the ticket.
The show slave status also has the ShowSlaveStatus::Gtid_Slave_Pos. May be we just need to introduce a new variable in SSS to compute the difference?
Pandikrishnan Gurusamy
added a comment - - edited The show slave status also has the ShowSlaveStatus::Gtid_Slave_Pos . May be we just need to introduce a new variable in SSS to compute the difference?
What about tracking the number of transactions/GTIDs that remain un-executed in the relay log (e.g. incremented when the IO thread queues a GTID event, and decremented when SQL thread/worker commit a trx)?
Brandon Nesterenko
added a comment - What about tracking the number of transactions/GTIDs that remain un-executed in the relay log (e.g. incremented when the IO thread queues a GTID event, and decremented when SQL thread/worker commit a trx)?
People
Brandon Nesterenko
Andrei Elkin
Votes:
1Vote for this issue
Watchers:
7Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":788,"ttfb":238.29999923706055,"pageVisibility":"visible","entityId":125731,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"dad4742a-93e1-4bad-95ef-ed7c93a61f82","navigationType":0,"readyForUser":861.7999992370605,"redirectCount":0,"resourceLoadedEnd":760.5999994277954,"resourceLoadedStart":245.89999961853027,"resourceTiming":[{"duration":38.60000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":245.89999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":245.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":284.5,"responseStart":0,"secureConnectionStart":0},{"duration":38.69999980926514,"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":246.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":246.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":284.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":81.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":246.39999961853027,"connectEnd":246.39999961853027,"connectStart":246.39999961853027,"domainLookupEnd":246.39999961853027,"domainLookupStart":246.39999961853027,"fetchStart":246.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":290.3999996185303,"responseEnd":327.5,"responseStart":304,"secureConnectionStart":246.39999961853027},{"duration":88.80000019073486,"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":246.69999980926514,"connectEnd":246.69999980926514,"connectStart":246.69999980926514,"domainLookupEnd":246.69999980926514,"domainLookupStart":246.69999980926514,"fetchStart":246.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":289.29999923706055,"responseEnd":335.5,"responseStart":300.79999923706055,"secureConnectionStart":246.69999980926514},{"duration":56.30000019073486,"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":246.89999961853027,"connectEnd":246.89999961853027,"connectStart":246.89999961853027,"domainLookupEnd":246.89999961853027,"domainLookupStart":246.89999961853027,"fetchStart":246.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":290.69999980926514,"responseEnd":303.19999980926514,"responseStart":302.19999980926514,"secureConnectionStart":246.89999961853027},{"duration":66.19999980926514,"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":247,"connectEnd":247,"connectStart":247,"domainLookupEnd":247,"domainLookupStart":247,"fetchStart":247,"redirectEnd":0,"redirectStart":0,"requestStart":293.19999980926514,"responseEnd":313.19999980926514,"responseStart":312.5,"secureConnectionStart":247},{"duration":65.30000019073486,"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":247.19999980926514,"connectEnd":247.19999980926514,"connectStart":247.19999980926514,"domainLookupEnd":247.19999980926514,"domainLookupStart":247.19999980926514,"fetchStart":247.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":296.5,"responseEnd":312.5,"responseStart":311.79999923706055,"secureConnectionStart":247.19999980926514},{"duration":48.30000019073486,"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":247.29999923706055,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":247.29999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":295.5999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":68.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":247.39999961853027,"connectEnd":247.39999961853027,"connectStart":247.39999961853027,"domainLookupEnd":247.39999961853027,"domainLookupStart":247.39999961853027,"fetchStart":247.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":297.29999923706055,"responseEnd":315.5,"responseStart":315,"secureConnectionStart":247.39999961853027},{"duration":48.59999942779541,"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":247.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":247.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":296.29999923706055,"responseStart":0,"secureConnectionStart":0},{"duration":141.10000038146973,"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":247.79999923706055,"connectEnd":373.69999980926514,"connectStart":373.69999980926514,"domainLookupEnd":373.69999980926514,"domainLookupStart":373.69999980926514,"fetchStart":247.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":374.0999994277954,"responseEnd":388.8999996185303,"responseStart":387.29999923706055,"secureConnectionStart":373.69999980926514},{"duration":504.69999980926514,"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":255.89999961853027,"connectEnd":255.89999961853027,"connectStart":255.89999961853027,"domainLookupEnd":255.89999961853027,"domainLookupStart":255.89999961853027,"fetchStart":255.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":747.1999998092651,"responseEnd":760.5999994277954,"responseStart":759.7999992370605,"secureConnectionStart":255.89999961853027},{"duration":503.19999980926514,"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":256.3999996185303,"connectEnd":256.3999996185303,"connectStart":256.3999996185303,"domainLookupEnd":256.3999996185303,"domainLookupStart":256.3999996185303,"fetchStart":256.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":747.3999996185303,"responseEnd":759.5999994277954,"responseStart":758.2999992370605,"secureConnectionStart":256.3999996185303},{"duration":225.70000076293945,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":531.2999992370605,"connectEnd":531.2999992370605,"connectStart":531.2999992370605,"domainLookupEnd":531.2999992370605,"domainLookupStart":531.2999992370605,"fetchStart":531.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":719.2999992370605,"responseEnd":757,"responseStart":756.3999996185303,"secureConnectionStart":531.2999992370605}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":75,"responseStart":239,"responseEnd":256,"domLoading":242,"domInteractive":915,"domContentLoadedEventStart":915,"domContentLoadedEventEnd":957,"domComplete":1523,"loadEventStart":1523,"loadEventEnd":1524,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":889.6999998092651},{"name":"bigPipe.sidebar-id.end","time":890.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.start","time":890.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":892.3999996185303},{"name":"activityTabFullyLoaded","time":975.3999996185303}],"measures":[],"correlationId":"fffccfc73fd5e7","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":101,"dbReadsTimeInMs":9,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
In my humble opinion a message like:
"N transactions behind the master"
is much better indicator than Seconds_behind_master.
1000 seconds behind can mean single long running transaction whereas 15 seconds behind can mean 40 transactions behind. A DBA could be concerned more about slave lag of 40 transactions than about 1 transaction lag. This will also allow for better alerts by monitoring tools.