With optimistic mode of parallel replication, if a query fails, then you can end up with log messages like this:
2019-09-17 19:27:07 140190015801088 [ERROR] Slave (additional info): Commit failed due to failure of an earlier commit on which this one depends Error_code: 1964
|
2019-09-17 19:27:07 140190015801088 [Warning] Slave: Duplicate entry '...' for key 'name' Error_code: 1062
|
2019-09-17 19:27:07 140190015801088 [Warning] Slave: Deadlock found when trying to get lock; try restarting transaction Error_code: 1213
|
2019-09-17 19:27:07 140190015801088 [Warning] Slave: Commit failed due to failure of an earlier commit on which this one depends Error_code: 1964
|
2019-09-17 19:27:07 140190015801088 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mariadb-bin.000001' position 50284765; GTID position '0-1-119489'
|
2019-09-17 19:27:07 140190315325184 [ERROR] Slave (additional info): Commit failed due to failure of an earlier commit on which this one depends Error_code: 1964
|
2019-09-17 19:27:07 140190315325184 [Warning] Slave: Deadlock found when trying to get lock; try restarting transaction Error_code: 1213
|
2019-09-17 19:27:07 140190315325184 [Warning] Slave: Connection was killed Error_code: 1927
|
2019-09-17 19:27:07 140190315325184 [Warning] Slave: Deadlock found when trying to get lock; try restarting transaction Error_code: 1213
|
2019-09-17 19:27:07 140190315325184 [Warning] Slave: Commit failed due to failure of an earlier commit on which this one depends Error_code: 1964
|
2019-09-17 19:27:07 140190315325184 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mariadb-bin.000001' position 50284765; GTID position '0-1-119489'
|
These messages are printed in slave_output_error_info. See here:
https://github.com/MariaDB/server/blob/mariadb-10.2.27/sql/slave.cc#L4756
With optimistic mode of parallel replication, the slave_output_error_info function can be called when a transaction has failed because another transaction that it depends on has failed. See here:
https://github.com/MariaDB/server/blob/mariadb-10.2.27/sql/rpl_parallel.cc#L1221
Some errors are considered "temporary errors". The only temporary errors are currently just deadlocks and timeouts. See here:
https://github.com/MariaDB/server/blob/mariadb-10.2.27/sql/slave.cc#L3381
In the case of a "temporary error", the event group can actually be retried. See here:
https://github.com/MariaDB/server/blob/mariadb-10.2.27/sql/rpl_parallel.cc#L1305
These retries happen if slave_transaction_retries is greater than 0.
https://mariadb.com/kb/en/library/replication-and-binary-log-system-variables/#slave_transaction_retries
In the example shown above, the errors were deadlocks, so the transactions were indeed retried. Notice that the following message was still included in the above log snippet:
2019-09-17 19:27:07 140190315325184 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mariadb-bin.000001' position 50284765; GTID position '0-1-119489'
This message is not quite correct in this case.
- The SQL thread was not aborted.
- The SQL thread does not need to be manually restarted.
It seems like this error message in slave_output_error_info should be slightly different if the SQL thread encounters a temporary error. In that case, maybe it should be a Warning instead of an Error, and maybe it should say something like this instead:
2019-09-17 19:27:07 140190315325184 [Warning] Temporary error running query. The slave SQL thread will retry the query. We encountered the temporary error at log 'mariadb-bin.000001' position 50284765; GTID position '0-1-119489'
Transition |
Time In Source Status |
Execution Times |
Open |
|
Closed |
|
386d 9h 53m
|
1
|
{"report":{"fcp":900.6000003814697,"ttfb":276.4000005722046,"pageVisibility":"visible","entityId":79073,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"f1aefe0d-e4cf-4bbd-a6f7-ca6be8e92e7c","navigationType":0,"readyForUser":981.6000003814697,"redirectCount":0,"resourceLoadedEnd":1427.4000005722046,"resourceLoadedStart":281.70000076293945,"resourceTiming":[{"duration":98.29999923706055,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":281.70000076293945,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":281.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":380,"responseStart":0,"secureConnectionStart":0},{"duration":100.20000076293945,"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":282,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":282,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":382.20000076293945,"responseStart":0,"secureConnectionStart":0},{"duration":153.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":282.20000076293945,"connectEnd":282.20000076293945,"connectStart":282.20000076293945,"domainLookupEnd":282.20000076293945,"domainLookupStart":282.20000076293945,"fetchStart":282.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":282.20000076293945,"responseEnd":435.5,"responseStart":435.5,"secureConnectionStart":282.20000076293945},{"duration":240.39999961853027,"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":282.4000005722046,"connectEnd":282.4000005722046,"connectStart":282.4000005722046,"domainLookupEnd":282.4000005722046,"domainLookupStart":282.4000005722046,"fetchStart":282.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":282.4000005722046,"responseEnd":522.8000001907349,"responseStart":522.8000001907349,"secureConnectionStart":282.4000005722046},{"duration":244.20000076293945,"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":282.5,"connectEnd":282.5,"connectStart":282.5,"domainLookupEnd":282.5,"domainLookupStart":282.5,"fetchStart":282.5,"redirectEnd":0,"redirectStart":0,"requestStart":282.5,"responseEnd":526.7000007629395,"responseStart":526.7000007629395,"secureConnectionStart":282.5},{"duration":244.30000019073486,"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":282.80000019073486,"connectEnd":282.80000019073486,"connectStart":282.80000019073486,"domainLookupEnd":282.80000019073486,"domainLookupStart":282.80000019073486,"fetchStart":282.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":282.80000019073486,"responseEnd":527.1000003814697,"responseStart":527.1000003814697,"secureConnectionStart":282.80000019073486},{"duration":244.5999994277954,"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":282.9000005722046,"connectEnd":282.9000005722046,"connectStart":282.9000005722046,"domainLookupEnd":282.9000005722046,"domainLookupStart":282.9000005722046,"fetchStart":282.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":282.9000005722046,"responseEnd":527.5,"responseStart":527.5,"secureConnectionStart":282.9000005722046},{"duration":296.29999923706055,"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":283.20000076293945,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":283.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":579.5,"responseStart":0,"secureConnectionStart":0},{"duration":244.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":283.30000019073486,"connectEnd":283.30000019073486,"connectStart":283.30000019073486,"domainLookupEnd":283.30000019073486,"domainLookupStart":283.30000019073486,"fetchStart":283.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":283.30000019073486,"responseEnd":528,"responseStart":528,"secureConnectionStart":283.30000019073486},{"duration":296.1000003814697,"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":283.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":283.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":579.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":244.79999923706055,"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":283.70000076293945,"connectEnd":283.70000076293945,"connectStart":283.70000076293945,"domainLookupEnd":283.70000076293945,"domainLookupStart":283.70000076293945,"fetchStart":283.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":283.70000076293945,"responseEnd":528.5,"responseStart":528.5,"secureConnectionStart":283.70000076293945},{"duration":1123.5999994277954,"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":289.4000005722046,"connectEnd":289.4000005722046,"connectStart":289.4000005722046,"domainLookupEnd":289.4000005722046,"domainLookupStart":289.4000005722046,"fetchStart":289.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":289.4000005722046,"responseEnd":1413,"responseStart":1413,"secureConnectionStart":289.4000005722046},{"duration":1124.4000005722046,"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":289.5,"connectEnd":289.5,"connectStart":289.5,"domainLookupEnd":289.5,"domainLookupStart":289.5,"fetchStart":289.5,"redirectEnd":0,"redirectStart":0,"requestStart":289.5,"responseEnd":1413.9000005722046,"responseStart":1413.9000005722046,"secureConnectionStart":289.5},{"duration":155.29999923706055,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":591.2000007629395,"connectEnd":591.2000007629395,"connectStart":591.2000007629395,"domainLookupEnd":591.2000007629395,"domainLookupStart":591.2000007629395,"fetchStart":591.2000007629395,"redirectEnd":0,"redirectStart":0,"requestStart":591.2000007629395,"responseEnd":746.5,"responseStart":746.5,"secureConnectionStart":591.2000007629395},{"duration":562.1999998092651,"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":853.2000007629395,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":853.2000007629395,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1415.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":564.2999992370605,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/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","startTime":854.2000007629395,"connectEnd":854.2000007629395,"connectStart":854.2000007629395,"domainLookupEnd":854.2000007629395,"domainLookupStart":854.2000007629395,"fetchStart":854.2000007629395,"redirectEnd":0,"redirectStart":0,"requestStart":854.2000007629395,"responseEnd":1418.5,"responseStart":1418.5,"secureConnectionStart":854.2000007629395},{"duration":542.1999998092651,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":894.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":894.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1436.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":572.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/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","startTime":854.5,"connectEnd":854.5,"connectStart":854.5,"domainLookupEnd":854.5,"domainLookupStart":854.5,"fetchStart":854.5,"redirectEnd":0,"redirectStart":0,"requestStart":854.5,"responseEnd":1427.4000005722046,"responseStart":1427.4000005722046,"secureConnectionStart":854.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":93,"responseStart":277,"responseEnd":281,"domLoading":280,"domInteractive":1444,"domContentLoadedEventStart":1444,"domContentLoadedEventEnd":1486,"domComplete":1869,"loadEventStart":1869,"loadEventEnd":1870,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1425.5},{"name":"bigPipe.sidebar-id.end","time":1426.2000007629395},{"name":"bigPipe.activity-panel-pipe-id.start","time":1426.4000005722046},{"name":"bigPipe.activity-panel-pipe-id.end","time":1427.2000007629395},{"name":"activityTabFullyLoaded","time":1497.6000003814697}],"measures":[],"correlationId":"687b9b16ad0228","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":124,"dbReadsTimeInMs":32,"dbConnsTimeInMs":41,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}