There's a race in mysql-test/suite/rpl/t/rpl_gtid_stop_start.test as follows:
The rpl_gtid_stop_start test used SELECT COUNT(*) as a wait_condition when waiting for rows to appear from the replication stream. Since the table it is waiting on is MyISAM, rows appearing there do not guarantee in any way that the GTID information will have been updated by the slave thread (and can't guarantee that). This causes a race in the test which is especially exacerbated by making the gtid_slave_pos table InnoDB, since then the COMMIT that is done as part of recording the GTID is bound to take some tens of milliseconds.
- is blocked by
-
MDEV-4984
Implement MASTER_GTID_WAIT()
-
-
Closed
{"report":{"fcp":1001.5,"ttfb":232.20000004768372,"pageVisibility":"visible","entityId":24470,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"f142346e-c3d1-4d77-aff9-6eb9341a1af8","navigationType":0,"readyForUser":1107.6000001430511,"redirectCount":0,"resourceLoadedEnd":1576.7000000476837,"resourceLoadedStart":237.30000019073486,"resourceTiming":[{"duration":258.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":237.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":496.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":258.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":237.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":496.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":267.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":237.80000019073486,"connectEnd":237.80000019073486,"connectStart":237.80000019073486,"domainLookupEnd":237.80000019073486,"domainLookupStart":237.80000019073486,"fetchStart":237.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":237.80000019073486,"responseEnd":505.7000000476837,"responseStart":505.7000000476837,"secureConnectionStart":237.80000019073486},{"duration":325.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":238,"connectEnd":238,"connectStart":238,"domainLookupEnd":238,"domainLookupStart":238,"fetchStart":238,"redirectEnd":0,"redirectStart":0,"requestStart":238,"responseEnd":563.9000000953674,"responseStart":563.9000000953674,"secureConnectionStart":238},{"duration":330,"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":238.20000004768372,"connectEnd":238.20000004768372,"connectStart":238.20000004768372,"domainLookupEnd":238.20000004768372,"domainLookupStart":238.20000004768372,"fetchStart":238.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":238.20000004768372,"responseEnd":568.2000000476837,"responseStart":568.2000000476837,"secureConnectionStart":238.20000004768372},{"duration":330.2000000476837,"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":238.40000009536743,"connectEnd":238.40000009536743,"connectStart":238.40000009536743,"domainLookupEnd":238.40000009536743,"domainLookupStart":238.40000009536743,"fetchStart":238.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":238.40000009536743,"responseEnd":568.6000001430511,"responseStart":568.6000001430511,"secureConnectionStart":238.40000009536743},{"duration":330.5,"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":238.5,"connectEnd":238.5,"connectStart":238.5,"domainLookupEnd":238.5,"domainLookupStart":238.5,"fetchStart":238.5,"redirectEnd":0,"redirectStart":0,"requestStart":238.5,"responseEnd":569,"responseStart":569,"secureConnectionStart":238.5},{"duration":415.2999999523163,"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":244.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":244.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":660,"responseStart":0,"secureConnectionStart":0},{"duration":324.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":244.90000009536743,"connectEnd":244.90000009536743,"connectStart":244.90000009536743,"domainLookupEnd":244.90000009536743,"domainLookupStart":244.90000009536743,"fetchStart":244.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":244.90000009536743,"responseEnd":569.6000001430511,"responseStart":569.6000001430511,"secureConnectionStart":244.90000009536743},{"duration":415,"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":245.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":245.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":660.1000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":325,"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":245.20000004768372,"connectEnd":245.20000004768372,"connectStart":245.20000004768372,"domainLookupEnd":245.20000004768372,"domainLookupStart":245.20000004768372,"fetchStart":245.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":245.20000004768372,"responseEnd":570.2000000476837,"responseStart":570.2000000476837,"secureConnectionStart":245.20000004768372},{"duration":674.4000000953674,"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":254.5,"connectEnd":254.5,"connectStart":254.5,"domainLookupEnd":254.5,"domainLookupStart":254.5,"fetchStart":254.5,"redirectEnd":0,"redirectStart":0,"requestStart":254.5,"responseEnd":928.9000000953674,"responseStart":928.9000000953674,"secureConnectionStart":254.5},{"duration":1263.5,"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":260,"connectEnd":260,"connectStart":260,"domainLookupEnd":260,"domainLookupStart":260,"fetchStart":260,"redirectEnd":0,"redirectStart":0,"requestStart":260,"responseEnd":1523.5,"responseStart":1523.5,"secureConnectionStart":260},{"duration":294.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":672.9000000953674,"connectEnd":672.9000000953674,"connectStart":672.9000000953674,"domainLookupEnd":672.9000000953674,"domainLookupStart":672.9000000953674,"fetchStart":672.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":672.9000000953674,"responseEnd":967.4000000953674,"responseStart":967.4000000953674,"secureConnectionStart":672.9000000953674},{"duration":661.2999999523163,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":993.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":993.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1654.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":567.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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&whisper-enabled=true","startTime":1030.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1030.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1598,"responseStart":0,"secureConnectionStart":0},{"duration":538.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1031.2000000476837,"connectEnd":1031.2000000476837,"connectStart":1031.2000000476837,"domainLookupEnd":1031.2000000476837,"domainLookupStart":1031.2000000476837,"fetchStart":1031.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1031.2000000476837,"responseEnd":1569.9000000953674,"responseStart":1569.8000001907349,"secureConnectionStart":1031.2000000476837},{"duration":544.8999998569489,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/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.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1031.8000001907349,"connectEnd":1031.8000001907349,"connectStart":1031.8000001907349,"domainLookupEnd":1031.8000001907349,"domainLookupStart":1031.8000001907349,"fetchStart":1031.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1031.8000001907349,"responseEnd":1576.7000000476837,"responseStart":1576.7000000476837,"secureConnectionStart":1031.8000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":69,"responseStart":232,"responseEnd":260,"domLoading":236,"domInteractive":1598,"domContentLoadedEventStart":1598,"domContentLoadedEventEnd":1651,"domComplete":2085,"loadEventStart":2085,"loadEventEnd":2085,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1525.6000001430511},{"name":"bigPipe.sidebar-id.end","time":1526.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1526.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1528.3000001907349},{"name":"activityTabFullyLoaded","time":1678.4000000953674}],"measures":[],"correlationId":"5b9014dec7c0c6","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":102,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I attached a patch which changes the wait_condition to wait on the proper GTID to appear instead of waiting on a row count. I believe this to be the only actual way to wait without a race when using MyISAM for gtid_slave_pos; nonetheless this is safe and effective anyway.