Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
10.3(EOL) , 10.4(EOL) , 10.5 , 10.6 , 10.7(EOL) , 10.8(EOL) , 10.9(EOL) , 10.10(EOL)
If the workers of a parallel replica are busy (potentially with long queues), but the SQL thread has no events left to distribute (so it goes idle). Then the next event that comes from the primary will update LMT with its timestamp, even if the workers may be quite far behind.
Proposed fix is for the SQL thread to additionally check if there are uncommitted events. That is, we should add an atomic counter (displayable as a new system status variable), which the SQL thread increments on reads, and that the workers decrement on commits. last_master_timestamp should only be updated by the SQL thread with the MDEV-29639 logic if this counter is 0.
Julien Fritsch
made changes -
2023-03-03 17:34
Fix Version/s
10.7
[ 24805
]
Julien Fritsch
made changes -
2023-04-27 13:46
Fix Version/s
10.3
[ 22126
]
Julien Fritsch
made changes -
2023-04-27 14:47
Fix Version/s
10.8
[ 26121
]
Brandon Nesterenko
made changes -
2023-06-29 15:56
Assignee
Brandon Nesterenko
[ JIRAUSER48702
]
Andrei Elkin
[ elkin
]
Status
In Progress
[ 3
]
In Review
[ 10002
]
Roel Van de Paar
made changes -
2023-07-18 03:51
Status
In Review
[ 10002
]
In Testing
[ 10301
]
Roel Van de Paar
made changes -
2023-07-18 22:44
Assignee
Andrei Elkin
[ elkin
]
Roel Van de Paar
[ roel
]
Roel Van de Paar
made changes -
2023-07-18 22:45
Description
If the workers of a parallel replica are busy (potentially with long queues), but the SQL thread has no events left to distribute (so it goes idle). Then the next event that comes from the primary will update lmt with its timestamp, even if the workers may be quite far behind.
Proposed fix is for the SQL thread to additionally check if there are uncommitted events. That is, we should add an atomic counter (displayable as a new system status variable), which the SQL thread increments on reads, and that the workers decrement on commits. last_master_timestamp should only be updated by the SQL thread with the MDEV-29639 logic if this counter is 0.
If the workers of a parallel replica are busy (potentially with long queues), but the SQL thread has no events left to distribute (so it goes idle). Then the next event that comes from the primary will update LMT with its timestamp, even if the workers may be quite far behind.
Proposed fix is for the SQL thread to additionally check if there are uncommitted events. That is, we should add an atomic counter (displayable as a new system status variable), which the SQL thread increments on reads, and that the workers decrement on commits. last_master_timestamp should only be updated by the SQL thread with the MDEV-29639 logic if this counter is 0.
Roel Van de Paar
made changes -
2023-07-20 02:58
Assignee
Roel Van de Paar
[ roel
]
Brandon Nesterenko
[ JIRAUSER48702
]
Roel Van de Paar
made changes -
2023-07-22 02:18
Assignee
Brandon Nesterenko
[ JIRAUSER48702
]
Roel Van de Paar
[ roel
]
Roel Van de Paar
made changes -
2023-07-22 03:22
Assignee
Roel Van de Paar
[ roel
]
Andrei Elkin
[ elkin
]
Status
In Testing
[ 10301
]
Stalled
[ 10000
]
Andrei Elkin
made changes -
2023-07-25 14:27
Fix Version/s
10.4.31
[ 29010
]
Fix Version/s
10.5.22
[ 29011
]
Fix Version/s
10.6.15
[ 29013
]
Fix Version/s
10.9.8
[ 29015
]
Fix Version/s
10.10.6
[ 29017
]
Fix Version/s
10.11.5
[ 29019
]
Fix Version/s
11.0.3
[ 28920
]
Fix Version/s
11.1.2
[ 28921
]
Fix Version/s
11.2.1
[ 29034
]
Fix Version/s
10.8.8
[ 28518
]
Fix Version/s
10.4
[ 22408
]
Fix Version/s
10.5
[ 23123
]
Fix Version/s
10.6
[ 24028
]
Fix Version/s
10.9
[ 26905
]
Fix Version/s
10.10
[ 27530
]
Resolution
Fixed
[ 1
]
Status
Stalled
[ 10000
]
Closed
[ 6
]
{"report":{"fcp":1461.0999999046326,"ttfb":431.5,"pageVisibility":"visible","entityId":119103,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"7bdf7ccb-b188-4c01-a2c4-f786cf5ed294","navigationType":0,"readyForUser":1553.4000000953674,"redirectCount":0,"resourceLoadedEnd":1372.1999998092651,"resourceLoadedStart":438.19999980926514,"resourceTiming":[{"duration":453.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":438.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":438.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":892.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":454.3999996185303,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":438.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":438.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":892.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":465.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":438.69999980926514,"connectEnd":438.69999980926514,"connectStart":438.69999980926514,"domainLookupEnd":438.69999980926514,"domainLookupStart":438.69999980926514,"fetchStart":438.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":438.69999980926514,"responseEnd":904.1999998092651,"responseStart":904.1999998092651,"secureConnectionStart":438.69999980926514},{"duration":521.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":438.7999997138977,"connectEnd":438.7999997138977,"connectStart":438.7999997138977,"domainLookupEnd":438.7999997138977,"domainLookupStart":438.7999997138977,"fetchStart":438.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":438.7999997138977,"responseEnd":960.1999998092651,"responseStart":960.1999998092651,"secureConnectionStart":438.7999997138977},{"duration":524.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":439.09999990463257,"connectEnd":439.09999990463257,"connectStart":439.09999990463257,"domainLookupEnd":439.09999990463257,"domainLookupStart":439.09999990463257,"fetchStart":439.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":439.09999990463257,"responseEnd":963.9000000953674,"responseStart":963.9000000953674,"secureConnectionStart":439.09999990463257},{"duration":525.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":439.19999980926514,"connectEnd":439.19999980926514,"connectStart":439.19999980926514,"domainLookupEnd":439.19999980926514,"domainLookupStart":439.19999980926514,"fetchStart":439.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":439.19999980926514,"responseEnd":964.4000000953674,"responseStart":964.4000000953674,"secureConnectionStart":439.19999980926514},{"duration":525.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":439.5,"connectEnd":439.5,"connectStart":439.5,"domainLookupEnd":439.5,"domainLookupStart":439.5,"fetchStart":439.5,"redirectEnd":0,"redirectStart":0,"requestStart":439.5,"responseEnd":965,"responseStart":965,"secureConnectionStart":439.5},{"duration":614.4000000953674,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":439.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":439.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1054,"responseStart":0,"secureConnectionStart":0},{"duration":526,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":439.7999997138977,"connectEnd":439.7999997138977,"connectStart":439.7999997138977,"domainLookupEnd":439.7999997138977,"domainLookupStart":439.7999997138977,"fetchStart":439.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":439.7999997138977,"responseEnd":965.7999997138977,"responseStart":965.7999997138977,"secureConnectionStart":439.7999997138977},{"duration":614.1999998092651,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":439.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":439.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1054.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":526.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":440.09999990463257,"connectEnd":440.09999990463257,"connectStart":440.09999990463257,"domainLookupEnd":440.09999990463257,"domainLookupStart":440.09999990463257,"fetchStart":440.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":440.09999990463257,"responseEnd":966.5,"responseStart":966.5,"secureConnectionStart":440.09999990463257},{"duration":742.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":441.5,"connectEnd":441.5,"connectStart":441.5,"domainLookupEnd":441.5,"domainLookupStart":441.5,"fetchStart":441.5,"redirectEnd":0,"redirectStart":0,"requestStart":441.5,"responseEnd":1184.0999999046326,"responseStart":1184.0999999046326,"secureConnectionStart":441.5},{"duration":743.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":441.59999990463257,"connectEnd":441.59999990463257,"connectStart":441.59999990463257,"domainLookupEnd":441.59999990463257,"domainLookupStart":441.59999990463257,"fetchStart":441.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":441.59999990463257,"responseEnd":1184.6999998092651,"responseStart":1184.6999998092651,"secureConnectionStart":441.59999990463257},{"duration":64.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1070.0999999046326,"connectEnd":1070.0999999046326,"connectStart":1070.0999999046326,"domainLookupEnd":1070.0999999046326,"domainLookupStart":1070.0999999046326,"fetchStart":1070.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1070.0999999046326,"responseEnd":1134.1999998092651,"responseStart":1134.1999998092651,"secureConnectionStart":1070.0999999046326},{"duration":218,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1154.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1154.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1372.1999998092651,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":162,"responseStart":431,"responseEnd":434,"domLoading":435,"domInteractive":1653,"domContentLoadedEventStart":1653,"domContentLoadedEventEnd":1722,"domComplete":2049,"loadEventStart":2050,"loadEventEnd":2050,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1607.2999997138977},{"name":"bigPipe.sidebar-id.end","time":1608.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1608.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1614.0999999046326},{"name":"activityTabFullyLoaded","time":1745.5}],"measures":[],"correlationId":"6a469b387cec89","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":208,"dbReadsTimeInMs":51,"dbConnsTimeInMs":63,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}