Hi,
I have been working on upgrading all of our MariaDB 5.5.63 servers since EOL is approaching.
So far I have upgraded 10 servers, and still have several more servers to go including our galera cluster. So far 3 of the servers after they were upgraded started with random corrupt secondary index on certain table not all just a few. I don't know or understand why it happening on some of the 10.3.21 servers that were upgrade but not all of them. I followed the same directions that is on the MariaDB site for each major version and made sure to run SET GLOBAL innodb_fast_shutdown=0 as per the documentation before each upgrade from 5.5. - > 10.0, 10.0 - > 10.1, 10.1 -> 10.2, 10.2 -> 10.3.21
After each upgrade I run mysql_upgrade and everything is clean. I started to see this error in the logs very soon after the upgrade. I know the fix is to recreate the indexes, but some of our tables are extremely large (for ex. 405 million rows ) and takes a very long time to create a new index.
Here is a the error that I see many times in the logs:
2020-02-20 14:28:09 3 [ERROR] InnoDB: tried to purge non-delete-marked record in index `index_name` of table `schemaname`.`tablename`: tuple: TUPLE (info_bits=0, 4 fields):
{NULL,[4] YCn(0xAD59436E),[4] (0x7FFFFFFF),[4] @(0x800CD040)}, record: COMPACT RECORD(info_bits=0, 4 fields): {NULL,[4] YCn(0xAD59436E),[4] (0x7FFFFFFF),[4] @(0x800CD040)}
2020-02-21 12:01:41 2 [ERROR] InnoDB: Unable to find a record to delete-mark
InnoDB: tuple DATA TUPLE: 2 fields;
0: len 4; hex 8108d277; asc w;;
1: len 4; hex 85cd439c; asc C ;;
InnoDB: record PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 4; hex 8108d273; asc s;;
1: len 4; hex 85c057ef; asc W ;;
2020-02-21 12:01:41 2 [ERROR] InnoDB: page [page id: space=242, page number=96050] (941 records, index id 594).
2020-02-21 12:01:41 2 [ERROR] InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
Is there anything I can do to prevent this from happening? Is this a bug? I am not concerned with small tables, but to get corrupted secondary indexes on large tables would cause a major issue in production, once we upgrade our Galera Cluster from MariaDB 5.5 to 10.3
Thanks
{"report":{"fcp":824.5,"ttfb":174.39999999850988,"pageVisibility":"visible","entityId":83428,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"eb72a86d-ece8-4a8b-b4aa-fbcdfc399c2b","navigationType":0,"readyForUser":892.2999999970198,"redirectCount":0,"resourceLoadedEnd":587.3999999985099,"resourceLoadedStart":188.89999999850988,"resourceTiming":[{"duration":177,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":188.89999999850988,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":188.89999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":365.8999999985099,"responseStart":0,"secureConnectionStart":0},{"duration":177,"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":189.20000000298023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":189.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":366.20000000298023,"responseStart":0,"secureConnectionStart":0},{"duration":185.60000000149012,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":189.29999999701977,"connectEnd":189.29999999701977,"connectStart":189.29999999701977,"domainLookupEnd":189.29999999701977,"domainLookupStart":189.29999999701977,"fetchStart":189.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":189.29999999701977,"responseEnd":374.8999999985099,"responseStart":374.8999999985099,"secureConnectionStart":189.29999999701977},{"duration":211.19999999552965,"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":189.60000000149012,"connectEnd":189.60000000149012,"connectStart":189.60000000149012,"domainLookupEnd":189.60000000149012,"domainLookupStart":189.60000000149012,"fetchStart":189.60000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":189.60000000149012,"responseEnd":400.79999999701977,"responseStart":400.79999999701977,"secureConnectionStart":189.60000000149012},{"duration":215.39999999850988,"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":189.70000000298023,"connectEnd":189.70000000298023,"connectStart":189.70000000298023,"domainLookupEnd":189.70000000298023,"domainLookupStart":189.70000000298023,"fetchStart":189.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":189.70000000298023,"responseEnd":405.1000000014901,"responseStart":405.1000000014901,"secureConnectionStart":189.70000000298023},{"duration":215.79999999701977,"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":190,"connectEnd":190,"connectStart":190,"domainLookupEnd":190,"domainLookupStart":190,"fetchStart":190,"redirectEnd":0,"redirectStart":0,"requestStart":190,"responseEnd":405.79999999701977,"responseStart":405.79999999701977,"secureConnectionStart":190},{"duration":217.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":190.20000000298023,"connectEnd":190.20000000298023,"connectStart":190.20000000298023,"domainLookupEnd":190.20000000298023,"domainLookupStart":190.20000000298023,"fetchStart":190.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":190.20000000298023,"responseEnd":407.70000000298023,"responseStart":407.70000000298023,"secureConnectionStart":190.20000000298023},{"duration":333,"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":190.39999999850988,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":190.39999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":523.3999999985099,"responseStart":0,"secureConnectionStart":0},{"duration":219,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":190.5,"connectEnd":190.5,"connectStart":190.5,"domainLookupEnd":190.5,"domainLookupStart":190.5,"fetchStart":190.5,"redirectEnd":0,"redirectStart":0,"requestStart":190.5,"responseEnd":409.5,"responseStart":409.5,"secureConnectionStart":190.5},{"duration":332.79999999701977,"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":190.70000000298023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":190.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":523.5,"responseStart":0,"secureConnectionStart":0},{"duration":221,"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":190.70000000298023,"connectEnd":190.70000000298023,"connectStart":190.70000000298023,"domainLookupEnd":190.70000000298023,"domainLookupStart":190.70000000298023,"fetchStart":190.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":190.70000000298023,"responseEnd":411.70000000298023,"responseStart":411.70000000298023,"secureConnectionStart":190.70000000298023},{"duration":334.69999999552965,"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":191.70000000298023,"connectEnd":191.70000000298023,"connectStart":191.70000000298023,"domainLookupEnd":191.70000000298023,"domainLookupStart":191.70000000298023,"fetchStart":191.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":191.70000000298023,"responseEnd":526.3999999985099,"responseStart":526.3999999985099,"secureConnectionStart":191.70000000298023},{"duration":395.69999999552965,"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":191.70000000298023,"connectEnd":191.70000000298023,"connectStart":191.70000000298023,"domainLookupEnd":191.70000000298023,"domainLookupStart":191.70000000298023,"fetchStart":191.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":191.70000000298023,"responseEnd":587.3999999985099,"responseStart":587.3999999985099,"secureConnectionStart":191.70000000298023},{"duration":248.39999999850988,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":605.7000000029802,"connectEnd":605.7000000029802,"connectStart":605.7000000029802,"domainLookupEnd":605.7000000029802,"domainLookupStart":605.7000000029802,"fetchStart":605.7000000029802,"redirectEnd":0,"redirectStart":0,"requestStart":605.7000000029802,"responseEnd":854.1000000014901,"responseStart":854.1000000014901,"secureConnectionStart":605.7000000029802},{"duration":113.19999999552965,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":816.1000000014901,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":816.1000000014901,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":929.2999999970198,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":10,"responseStart":174,"responseEnd":178,"domLoading":185,"domInteractive":949,"domContentLoadedEventStart":949,"domContentLoadedEventEnd":985,"domComplete":1353,"loadEventStart":1353,"loadEventEnd":1355,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":930.8999999985099},{"name":"bigPipe.sidebar-id.end","time":931.7000000029802},{"name":"bigPipe.activity-panel-pipe-id.start","time":931.8999999985099},{"name":"bigPipe.activity-panel-pipe-id.end","time":934.2999999970198},{"name":"activityTabFullyLoaded","time":991.2999999970198}],"measures":[],"correlationId":"89ab16e8a5541e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":105,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}