It isn't clear yet whether this can cause a real problem, but it appears somewhat unexpected and vaguely disturbing in the context of provider plugins, so I think at least it is worth thinking what possible side effects it may have.
The test case is derived from plugins.compression, with only important difference that it sets shutdown_timeout to zero, thus disallowing the server to shut down normally.
Then, even though after the server is restarted without the provider at all, SELECT from the compressed table succeeds instead of failing with ER_NO_SUCH_TABLE_IN_ENGINE.
--source include/have_innodb.inc
let $restart_parameters = --plugin-load-add=provider_snappy;
source include/restart_mysqld.inc;
setglobal innodb_compression_algorithm = snappy;
createtable t1 (a int, b text) engine=InnoDB page_compressed=1;
Likely it's the same thing that caused mariabackup tests to pass without mariabackup actually supporting compression (MDEV-26773). Perhaps fresh table data are read from the uncompressed log before they're written to a compressed table space.
I don't see what can we do about it
Sergei Golubchik
added a comment - - edited Likely it's the same thing that caused mariabackup tests to pass without mariabackup actually supporting compression ( MDEV-26773 ). Perhaps fresh table data are read from the uncompressed log before they're written to a compressed table space.
I don't see what can we do about it
Crash recovery must read the first page of any .ibd file that is referred to by the redo log. At that point, if the file is in the innodb_checksum_algorithm=full_crc32 format, we will know the compression algorithm. If the compression library is not available, we can (and in my opinion should) refuse to start up the server unless innodb_force_recovery has been set to a nonzero value.
Marko Mäkelä
added a comment - Crash recovery must read the first page of any .ibd file that is referred to by the redo log. At that point, if the file is in the innodb_checksum_algorithm=full_crc32 format, we will know the compression algorithm. If the compression library is not available, we can (and in my opinion should) refuse to start up the server unless innodb_force_recovery has been set to a nonzero value.
I don't think it even needs to be fixed, if InnoDB reads uncompressed pages from the redo log — well good for them, why should we introduce artificial limitations and prevent it from doing that?
Sergei Golubchik
added a comment - I don't think it even needs to be fixed, if InnoDB reads uncompressed pages from the redo log — well good for them, why should we introduce artificial limitations and prevent it from doing that?
I do not think that it is easy to issue a meaningful warning for tables that are unaccessible to purge. We cannot add a table to cache if we cannot load the tablespace. If we do not cache the table, how can we avoid issuing umpteen warnings, one per to-be-purged undo log record?
It is not ‘some pages are lost’ but ‘some history was not purged‘. That is, some garbage may remain in the table, should the table be made available at some later point. The situation could be rectified by executing OPTIMIZE TABLE or ALTER TABLE…FORCE. It is only a matter of failing to reclaim some space, or failing to reset transaction identifiers (MDEV-12288). Purging undo log records without cleaning up the index pages should not affect correctness, only performance.
Marko Mäkelä
added a comment - I do not think that it is easy to issue a meaningful warning for tables that are unaccessible to purge. We cannot add a table to cache if we cannot load the tablespace. If we do not cache the table, how can we avoid issuing umpteen warnings, one per to-be-purged undo log record?
It is not ‘some pages are lost’ but ‘some history was not purged‘. That is, some garbage may remain in the table, should the table be made available at some later point. The situation could be rectified by executing OPTIMIZE TABLE or ALTER TABLE…FORCE . It is only a matter of failing to reclaim some space, or failing to reset transaction identifiers ( MDEV-12288 ). Purging undo log records without cleaning up the index pages should not affect correctness, only performance.
It's not a bug that InnoDB can read some pages of the compressed table even if the compression isn't available. Recently modified pages reside in the uncompressed redo log, it's normal that that are accessible even if compression is disabled.
Sergei Golubchik
added a comment - It's not a bug that InnoDB can read some pages of the compressed table even if the compression isn't available. Recently modified pages reside in the uncompressed redo log, it's normal that that are accessible even if compression is disabled.
People
Sergei Golubchik
Elena Stepanova
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":803.3000000119209,"ttfb":225.4000000357628,"pageVisibility":"visible","entityId":103623,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"4cd66043-a134-4d38-bede-bfe6738c0b9d","navigationType":0,"readyForUser":872.3000000119209,"redirectCount":0,"resourceLoadedEnd":469.5,"resourceLoadedStart":232.80000001192093,"resourceTiming":[{"duration":5.800000011920929,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":232.80000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":232.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":238.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":5.800000011920929,"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":233,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":233,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":238.80000001192093,"responseStart":0,"secureConnectionStart":0},{"duration":138.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":233.20000004768372,"connectEnd":233.20000004768372,"connectStart":233.20000004768372,"domainLookupEnd":233.20000004768372,"domainLookupStart":233.20000004768372,"fetchStart":233.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":241.9000000357628,"responseEnd":371.60000002384186,"responseStart":263.7000000476837,"secureConnectionStart":233.20000004768372},{"duration":176.5999999642372,"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":233.4000000357628,"connectEnd":233.4000000357628,"connectStart":233.4000000357628,"domainLookupEnd":233.4000000357628,"domainLookupStart":233.4000000357628,"fetchStart":233.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":242.70000004768372,"responseEnd":410,"responseStart":266.80000001192093,"secureConnectionStart":233.4000000357628},{"duration":36.5,"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":233.60000002384186,"connectEnd":233.60000002384186,"connectStart":233.60000002384186,"domainLookupEnd":233.60000002384186,"domainLookupStart":233.60000002384186,"fetchStart":233.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":242.9000000357628,"responseEnd":270.10000002384186,"responseStart":268.9000000357628,"secureConnectionStart":233.60000002384186},{"duration":38.09999996423721,"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":233.70000004768372,"connectEnd":233.70000004768372,"connectStart":233.70000004768372,"domainLookupEnd":233.70000004768372,"domainLookupStart":233.70000004768372,"fetchStart":233.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":244.4000000357628,"responseEnd":271.80000001192093,"responseStart":270.30000001192093,"secureConnectionStart":233.70000004768372},{"duration":40.89999997615814,"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":233.9000000357628,"connectEnd":233.9000000357628,"connectStart":233.9000000357628,"domainLookupEnd":233.9000000357628,"domainLookupStart":233.9000000357628,"fetchStart":233.9000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":245,"responseEnd":274.80000001192093,"responseStart":272.60000002384186,"secureConnectionStart":233.9000000357628},{"duration":8.600000023841858,"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":234.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":234.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":242.70000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":40.40000003576279,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":234.30000001192093,"connectEnd":234.30000001192093,"connectStart":234.30000001192093,"domainLookupEnd":234.30000001192093,"domainLookupStart":234.30000001192093,"fetchStart":234.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":245.20000004768372,"responseEnd":274.7000000476837,"responseStart":272,"secureConnectionStart":234.30000001192093},{"duration":10.199999988079071,"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":234.4000000357628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":234.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":244.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":40.30000001192093,"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":234.80000001192093,"connectEnd":234.80000001192093,"connectStart":234.80000001192093,"domainLookupEnd":234.80000001192093,"domainLookupStart":234.80000001192093,"fetchStart":234.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":247,"responseEnd":275.10000002384186,"responseStart":273.30000001192093,"secureConnectionStart":234.80000001192093},{"duration":218.0999999642372,"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":251.4000000357628,"connectEnd":251.4000000357628,"connectStart":251.4000000357628,"domainLookupEnd":251.4000000357628,"domainLookupStart":251.4000000357628,"fetchStart":251.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":260.2000000476837,"responseEnd":469.5,"responseStart":467.60000002384186,"secureConnectionStart":251.4000000357628},{"duration":197.19999998807907,"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":260.10000002384186,"connectEnd":260.10000002384186,"connectStart":260.10000002384186,"domainLookupEnd":260.10000002384186,"domainLookupStart":260.10000002384186,"fetchStart":260.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":268.7000000476837,"responseEnd":457.30000001192093,"responseStart":455.9000000357628,"secureConnectionStart":260.10000002384186},{"duration":212.9000000357628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":557.8000000119209,"connectEnd":557.8000000119209,"connectStart":557.8000000119209,"domainLookupEnd":557.8000000119209,"domainLookupStart":557.8000000119209,"fetchStart":557.8000000119209,"redirectEnd":0,"redirectStart":0,"requestStart":738.1000000238419,"responseEnd":770.7000000476837,"responseStart":769.4000000357628,"secureConnectionStart":557.8000000119209}],"fetchStart":0,"domainLookupStart":26,"domainLookupEnd":30,"connectStart":30,"connectEnd":49,"secureConnectionStart":39,"requestStart":50,"responseStart":226,"responseEnd":260,"domLoading":229,"domInteractive":936,"domContentLoadedEventStart":936,"domContentLoadedEventEnd":977,"domComplete":1649,"loadEventStart":1649,"loadEventEnd":1649,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":910},{"name":"bigPipe.sidebar-id.end","time":910.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.start","time":910.8000000119209},{"name":"bigPipe.activity-panel-pipe-id.end","time":912.8000000119209},{"name":"activityTabFullyLoaded","time":996.5}],"measures":[],"correlationId":"a527d624716621","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":15,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I have no objections against demoting it and removing it from 10.7 RC scope once it has been looked at.