Type:
Task
Priority:
Major
Resolution:
Unresolved
This is the last ticket to solve deadlocks in XA parallel replication.
After MDEV-26682 and MDEV-33454 there is only one possibility for a parallel replication applier thread to wait for a prepared XA transaction — if it'll step on a row that was modified by the prepared XA transaction.
But the very fact that this — later — transaction is being executed means, that on the master it did not step on that row . Probably, because of a different execution plan. This means that on the slave it does not have to wait for XA COMMIT, this row won't be part of the write set, it'll be rejected by the WHERE clause anyway. The applier can simply ignore this row, pretend that it doesn't exists, and move on.
That is, in the replication applier thread InnoDB does not need to wait on rows, modified by a prepared transaction.
Note: there is a special case here, if a binlog contains XA PREPARE ... XA COMMIT (or ROLLBACK) ... some other transaction — that this other transaction can start getting applied before XA COMMIT/ROLLBACK. In that case it has to wait on the row lock, because it would be a row it could had seen on the master. This is why rows can only be skipped if no XA ROLLBACK or XA COMMIT has already been read from the relay log and scheduled for execution.
{"report":{"fcp":1559.2999999523163,"ttfb":295.19999998807907,"pageVisibility":"visible","entityId":127896,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":16,"apdex":0.5,"journeyId":"5a52e85c-3be3-4869-869f-92d1177f0088","navigationType":0,"readyForUser":1650.2999999523163,"redirectCount":0,"resourceLoadedEnd":1995.0999999642372,"resourceLoadedStart":306.69999998807907,"resourceTiming":[{"duration":639.6999999880791,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":306.69999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":306.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":946.3999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":639.6000000238419,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":306.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":306.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":946.5,"responseStart":0,"secureConnectionStart":0},{"duration":658,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":307.0999999642372,"connectEnd":307.0999999642372,"connectStart":307.0999999642372,"domainLookupEnd":307.0999999642372,"domainLookupStart":307.0999999642372,"fetchStart":307.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":307.0999999642372,"responseEnd":965.0999999642372,"responseStart":965.0999999642372,"secureConnectionStart":307.0999999642372},{"duration":767.6999999880791,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":307.5999999642372,"connectEnd":307.5999999642372,"connectStart":307.5999999642372,"domainLookupEnd":307.5999999642372,"domainLookupStart":307.5999999642372,"fetchStart":307.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":307.5999999642372,"responseEnd":1075.2999999523163,"responseStart":1075.2999999523163,"secureConnectionStart":307.5999999642372},{"duration":772.3000000119209,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":307.69999998807907,"connectEnd":307.69999998807907,"connectStart":307.69999998807907,"domainLookupEnd":307.69999998807907,"domainLookupStart":307.69999998807907,"fetchStart":307.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":307.69999998807907,"responseEnd":1080,"responseStart":1080,"secureConnectionStart":307.69999998807907},{"duration":775.3000000119209,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":307.89999997615814,"connectEnd":307.89999997615814,"connectStart":307.89999997615814,"domainLookupEnd":307.89999997615814,"domainLookupStart":307.89999997615814,"fetchStart":307.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":307.89999997615814,"responseEnd":1083.199999988079,"responseStart":1083.199999988079,"secureConnectionStart":307.89999997615814},{"duration":776.3000000119209,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":307.89999997615814,"connectEnd":307.89999997615814,"connectStart":307.89999997615814,"domainLookupEnd":307.89999997615814,"domainLookupStart":307.89999997615814,"fetchStart":307.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":307.89999997615814,"responseEnd":1084.199999988079,"responseStart":1084.199999988079,"secureConnectionStart":307.89999997615814},{"duration":782.6999999880791,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":308.0999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":308.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1090.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":782.6999999880791,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":308.19999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":308.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1090.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":777.3999999761581,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":308.19999998807907,"connectEnd":308.19999998807907,"connectStart":308.19999998807907,"domainLookupEnd":308.19999998807907,"domainLookupStart":308.19999998807907,"fetchStart":308.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":308.19999998807907,"responseEnd":1085.5999999642372,"responseStart":1085.5999999642372,"secureConnectionStart":308.19999998807907},{"duration":778.6000000238419,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":308.39999997615814,"connectEnd":308.39999997615814,"connectStart":308.39999997615814,"domainLookupEnd":308.39999997615814,"domainLookupStart":308.39999997615814,"fetchStart":308.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":308.39999997615814,"responseEnd":1087,"responseStart":1087,"secureConnectionStart":308.39999997615814},{"duration":986.8999999761581,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":311.89999997615814,"connectEnd":311.89999997615814,"connectStart":311.89999997615814,"domainLookupEnd":311.89999997615814,"domainLookupStart":311.89999997615814,"fetchStart":311.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":311.89999997615814,"responseEnd":1298.7999999523163,"responseStart":1298.7999999523163,"secureConnectionStart":311.89999997615814},{"duration":1683,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":312.0999999642372,"connectEnd":312.0999999642372,"connectStart":312.0999999642372,"domainLookupEnd":312.0999999642372,"domainLookupStart":312.0999999642372,"fetchStart":312.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":312.0999999642372,"responseEnd":1995.0999999642372,"responseStart":1995.0999999642372,"secureConnectionStart":312.0999999642372},{"duration":741.8999999761581,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1252.3999999761581,"connectEnd":1252.3999999761581,"connectStart":1252.3999999761581,"domainLookupEnd":1252.3999999761581,"domainLookupStart":1252.3999999761581,"fetchStart":1252.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":1252.3999999761581,"responseEnd":1994.2999999523163,"responseStart":1994.2999999523163,"secureConnectionStart":1252.3999999761581},{"duration":515.1999999880791,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1548.0999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1548.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2063.2999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":158,"responseStart":295,"responseEnd":312,"domLoading":299,"domInteractive":2028,"domContentLoadedEventStart":2028,"domContentLoadedEventEnd":2067,"domComplete":3086,"loadEventStart":3086,"loadEventEnd":3088,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2007.5},{"name":"bigPipe.sidebar-id.end","time":2008.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":2008.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":2010.8999999761581},{"name":"activityTabFullyLoaded","time":2076.899999976158}],"measures":[],"correlationId":"e340ae3b810c0d","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":87,"dbReadsTimeInMs":18,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}