I analyzed an rr replay trace where an undo log page was corrupted. The undo log page contents was recovered entirely based on redo log records (thanks to MDEV-12699).
It turns out that when we removed the MLOG_UNDO_ERASE_END record in MariaDB 10.3.3 in an attempt to reduce our redo log volume, we created a technical debt that was collected when MDEV-12353 optimized the redo log volume further. The MDEV-12353 replacement of mlog_write_ulint() would avoid logging the first bytes that were not actually changed in the page. But, because trx_undo_report_row_operation() is invoking memset() without writing redo log about it, the page images would differ between the time the server was killed, and the time the page was recovered.
To avoid this corruption, we must write redo log for the memset() operation unless the entire undo log page will be freed in the mini-transaction.
This bug is apparently very hard to hit, because even though MDEV-12353 introduced it already in 10.5.2, we first saw it a week ago when testing a development version of MDEV-23399 (which changes the page flushing algorithm and could therefore affect timings).
- is caused by
-
MDEV-12353
Efficient InnoDB redo log record format
-
-
Closed
There are no comments yet on this issue.
{"report":{"fcp":921.0999999046326,"ttfb":332.2000002861023,"pageVisibility":"visible","entityId":91985,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"981e798b-8298-467e-9247-c1e8dba91916","navigationType":0,"readyForUser":974.5999999046326,"redirectCount":0,"resourceLoadedEnd":1108.7000002861023,"resourceLoadedStart":353.90000009536743,"resourceTiming":[{"duration":27.699999809265137,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":353.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":353.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":381.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":28.799999713897705,"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":354.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":354.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":383,"responseStart":0,"secureConnectionStart":0},{"duration":74.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":354.40000009536743,"connectEnd":354.40000009536743,"connectStart":354.40000009536743,"domainLookupEnd":354.40000009536743,"domainLookupStart":354.40000009536743,"fetchStart":354.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":393.40000009536743,"responseEnd":429,"responseStart":405.90000009536743,"secureConnectionStart":354.40000009536743},{"duration":148.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":354.80000019073486,"connectEnd":354.80000019073486,"connectStart":354.80000019073486,"domainLookupEnd":354.80000019073486,"domainLookupStart":354.80000019073486,"fetchStart":354.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":412.59999990463257,"responseEnd":503.7000002861023,"responseStart":425.90000009536743,"secureConnectionStart":354.80000019073486},{"duration":83,"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":355,"connectEnd":355,"connectStart":355,"domainLookupEnd":355,"domainLookupStart":355,"fetchStart":355,"redirectEnd":0,"redirectStart":0,"requestStart":420.90000009536743,"responseEnd":438,"responseStart":436.90000009536743,"secureConnectionStart":355},{"duration":256.59999990463257,"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":355.2000002861023,"connectEnd":355.2000002861023,"connectStart":355.2000002861023,"domainLookupEnd":355.2000002861023,"domainLookupStart":355.2000002861023,"fetchStart":355.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":598.0999999046326,"responseEnd":611.8000001907349,"responseStart":609.5,"secureConnectionStart":355.2000002861023},{"duration":259.09999990463257,"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":355.40000009536743,"connectEnd":355.40000009536743,"connectStart":355.40000009536743,"domainLookupEnd":355.40000009536743,"domainLookupStart":355.40000009536743,"fetchStart":355.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":598.3000001907349,"responseEnd":614.5,"responseStart":612.3000001907349,"secureConnectionStart":355.40000009536743},{"duration":79.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":355.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":355.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":434.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":260,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":355.7000002861023,"connectEnd":355.7000002861023,"connectStart":355.7000002861023,"domainLookupEnd":355.7000002861023,"domainLookupStart":355.7000002861023,"fetchStart":355.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":600.5,"responseEnd":615.7000002861023,"responseStart":613.8000001907349,"secureConnectionStart":355.7000002861023},{"duration":434,"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":356.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":356.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":790.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":261.30000019073486,"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":356.40000009536743,"connectEnd":356.40000009536743,"connectStart":356.40000009536743,"domainLookupEnd":356.40000009536743,"domainLookupStart":356.40000009536743,"fetchStart":356.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":603.3000001907349,"responseEnd":617.7000002861023,"responseStart":616.3000001907349,"secureConnectionStart":356.40000009536743},{"duration":487.09999990463257,"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":363.2000002861023,"connectEnd":363.2000002861023,"connectStart":363.2000002861023,"domainLookupEnd":363.2000002861023,"domainLookupStart":363.2000002861023,"fetchStart":363.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":837.8000001907349,"responseEnd":850.3000001907349,"responseStart":849.3000001907349,"secureConnectionStart":363.2000002861023},{"duration":745.4000000953674,"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":363.30000019073486,"connectEnd":363.30000019073486,"connectStart":363.30000019073486,"domainLookupEnd":363.30000019073486,"domainLookupStart":363.30000019073486,"fetchStart":363.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":1095.9000000953674,"responseEnd":1108.7000002861023,"responseStart":1108.0999999046326,"secureConnectionStart":363.30000019073486},{"duration":234.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":626.8000001907349,"connectEnd":626.8000001907349,"connectStart":626.8000001907349,"domainLookupEnd":626.8000001907349,"domainLookupStart":626.8000001907349,"fetchStart":626.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":823.3000001907349,"responseEnd":861.3000001907349,"responseStart":860.8000001907349,"secureConnectionStart":626.8000001907349},{"duration":256.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":876.4000000953674,"connectEnd":876.4000000953674,"connectStart":876.4000000953674,"domainLookupEnd":876.4000000953674,"domainLookupStart":876.4000000953674,"fetchStart":876.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1096.4000000953674,"responseEnd":1133,"responseStart":1131.8000001907349,"secureConnectionStart":876.4000000953674},{"duration":187.39999961853027,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":914.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":914.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1101.5999999046326,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":129,"domainLookupEnd":154,"connectStart":154,"connectEnd":176,"secureConnectionStart":164,"requestStart":177,"responseStart":332,"responseEnd":364,"domLoading":336,"domInteractive":1122,"domContentLoadedEventStart":1122,"domContentLoadedEventEnd":1158,"domComplete":1710,"loadEventStart":1710,"loadEventEnd":1711,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1110.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1111.7000002861023},{"name":"bigPipe.activity-panel-pipe-id.start","time":1111.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1112.4000000953674},{"name":"activityTabFullyLoaded","time":1167.9000000953674}],"measures":[],"correlationId":"9f5777d6c95005","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":90,"dbReadsTimeInMs":14,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}