Ever since InnoDB table cache eviction was implemented, it became necessary to invoke dict_table_close() to release table handles. Because this call requires the dict_sys->mutex to be held, the mutex currently needs to be held also while invoking que_graph_free(). This feels very inefficient and cumbersome. Could we streamline dict_table_close() further, so that no mutex is needed in this case? Note: dict_table_t::release() already uses atomic memory operations.
MDEV-19505-WIP.patch is a starting point, against 10.4 as of this writing. It will crash at InnoDB startup because of a dict_table_close() call.
Marko Mäkelä
added a comment - MDEV-19505-WIP.patch is a starting point, against 10.4 as of this writing. It will crash at InnoDB startup because of a dict_table_close() call.
This is about removing technical debt, or improving performance. Because I expect this to be a rather large change, I do not think that it is safe to apply in any GA version.
Marko Mäkelä
added a comment - This is about removing technical debt, or improving performance. Because I expect this to be a rather large change, I do not think that it is safe to apply in any GA version.
This appears to be trivial to implement after all. In sym_tab_free_private() it is not necessary to hold a data dictionary latch; we can simply invoke dict_table_t::release().
There is some special handling in dict_table_close(), for ensuring that InnoDB persistent statistics are deinitialized on FLUSH TABLES (presumably so that a manual update of mysql.innodb_table_stats and mysql.innodb_index_stats would take effect). I do not think that the access to tables by the InnoDB internal SQL parser should interfere with that.
Marko Mäkelä
added a comment - This came up while I was working on MDEV-25919 .
This appears to be trivial to implement after all. In sym_tab_free_private() it is not necessary to hold a data dictionary latch; we can simply invoke dict_table_t::release() .
There is some special handling in dict_table_close() , for ensuring that InnoDB persistent statistics are deinitialized on FLUSH TABLES (presumably so that a manual update of mysql.innodb_table_stats and mysql.innodb_index_stats would take effect). I do not think that the access to tables by the InnoDB internal SQL parser should interfere with that.
People
Marko Mäkelä
Marko Mäkelä
Votes:
0Vote for this issue
Watchers:
6Start 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":1317.7999999523163,"ttfb":427.89999997615814,"pageVisibility":"visible","entityId":76088,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6ac91162-2049-4875-8b83-bccc37963507","navigationType":0,"readyForUser":1398.2000000476837,"redirectCount":0,"resourceLoadedEnd":1439.8999999761581,"resourceLoadedStart":434.89999997615814,"resourceTiming":[{"duration":369.8000000715256,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":434.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":434.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":804.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":370,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":435.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":435.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":805.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":378.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":435.39999997615814,"connectEnd":435.39999997615814,"connectStart":435.39999997615814,"domainLookupEnd":435.39999997615814,"domainLookupStart":435.39999997615814,"fetchStart":435.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":435.39999997615814,"responseEnd":814.2999999523163,"responseStart":814.2999999523163,"secureConnectionStart":435.39999997615814},{"duration":442.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":435.5,"connectEnd":435.5,"connectStart":435.5,"domainLookupEnd":435.5,"domainLookupStart":435.5,"fetchStart":435.5,"redirectEnd":0,"redirectStart":0,"requestStart":435.5,"responseEnd":877.7999999523163,"responseStart":877.7999999523163,"secureConnectionStart":435.5},{"duration":446.6999999284744,"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":435.7000000476837,"connectEnd":435.7000000476837,"connectStart":435.7000000476837,"domainLookupEnd":435.7000000476837,"domainLookupStart":435.7000000476837,"fetchStart":435.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":435.7000000476837,"responseEnd":882.3999999761581,"responseStart":882.3999999761581,"secureConnectionStart":435.7000000476837},{"duration":447.10000002384186,"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":435.7999999523163,"connectEnd":435.7999999523163,"connectStart":435.7999999523163,"domainLookupEnd":435.7999999523163,"domainLookupStart":435.7999999523163,"fetchStart":435.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":435.7999999523163,"responseEnd":882.8999999761581,"responseStart":882.8999999761581,"secureConnectionStart":435.7999999523163},{"duration":447.10000002384186,"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":436.10000002384186,"connectEnd":436.10000002384186,"connectStart":436.10000002384186,"domainLookupEnd":436.10000002384186,"domainLookupStart":436.10000002384186,"fetchStart":436.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":436.10000002384186,"responseEnd":883.2000000476837,"responseStart":883.2000000476837,"secureConnectionStart":436.10000002384186},{"duration":523,"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":436.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":436.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":959.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":447.3000000715256,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":436.39999997615814,"connectEnd":436.39999997615814,"connectStart":436.39999997615814,"domainLookupEnd":436.39999997615814,"domainLookupStart":436.39999997615814,"fetchStart":436.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":436.39999997615814,"responseEnd":883.7000000476837,"responseStart":883.7000000476837,"secureConnectionStart":436.39999997615814},{"duration":522.7999999523163,"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":436.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":436.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":959.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":447.6999999284744,"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":436.60000002384186,"connectEnd":436.60000002384186,"connectStart":436.60000002384186,"domainLookupEnd":436.60000002384186,"domainLookupStart":436.60000002384186,"fetchStart":436.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":436.60000002384186,"responseEnd":884.2999999523163,"responseStart":884.2999999523163,"secureConnectionStart":436.60000002384186},{"duration":739.6999999284744,"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":442.10000002384186,"connectEnd":442.10000002384186,"connectStart":442.10000002384186,"domainLookupEnd":442.10000002384186,"domainLookupStart":442.10000002384186,"fetchStart":442.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":442.10000002384186,"responseEnd":1181.7999999523163,"responseStart":1181.7999999523163,"secureConnectionStart":442.10000002384186},{"duration":988.6000000238419,"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":442.10000002384186,"connectEnd":442.10000002384186,"connectStart":442.10000002384186,"domainLookupEnd":442.10000002384186,"domainLookupStart":442.10000002384186,"fetchStart":442.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":442.10000002384186,"responseEnd":1430.7000000476837,"responseStart":1430.7000000476837,"secureConnectionStart":442.10000002384186},{"duration":209.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":970.8999999761581,"connectEnd":970.8999999761581,"connectStart":970.8999999761581,"domainLookupEnd":970.8999999761581,"domainLookupStart":970.8999999761581,"fetchStart":970.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":970.8999999761581,"responseEnd":1180.1000000238419,"responseStart":1180.1000000238419,"secureConnectionStart":970.8999999761581},{"duration":193.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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":1246.1000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1246.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1439.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":193.29999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1246.6000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1246.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1439.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":285.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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":1247.5,"connectEnd":1247.5,"connectStart":1247.5,"domainLookupEnd":1247.5,"domainLookupStart":1247.5,"fetchStart":1247.5,"redirectEnd":0,"redirectStart":0,"requestStart":1247.5,"responseEnd":1532.6000000238419,"responseStart":1532.6000000238419,"secureConnectionStart":1247.5},{"duration":319.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/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":1247.8999999761581,"connectEnd":1247.8999999761581,"connectStart":1247.8999999761581,"domainLookupEnd":1247.8999999761581,"domainLookupStart":1247.8999999761581,"fetchStart":1247.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":1247.8999999761581,"responseEnd":1567.7999999523163,"responseStart":1567.7999999523163,"secureConnectionStart":1247.8999999761581},{"duration":321,"initiatorType":"script","name":"https://jira.mariadb.org/s/e0bf5781d46ea69fb123572974cf39de-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":1248.2000000476837,"connectEnd":1248.2000000476837,"connectStart":1248.2000000476837,"domainLookupEnd":1248.2000000476837,"domainLookupStart":1248.2000000476837,"fetchStart":1248.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1248.2000000476837,"responseEnd":1569.2000000476837,"responseStart":1569.2000000476837,"secureConnectionStart":1248.2000000476837}],"fetchStart":0,"domainLookupStart":122,"domainLookupEnd":231,"connectStart":231,"connectEnd":258,"secureConnectionStart":240,"requestStart":259,"responseStart":428,"responseEnd":441,"domLoading":431,"domInteractive":1520,"domContentLoadedEventStart":1520,"domContentLoadedEventEnd":1560,"domComplete":2394,"loadEventStart":2394,"loadEventEnd":2395,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1493.1000000238419},{"name":"bigPipe.sidebar-id.end","time":1493.8999999761581},{"name":"bigPipe.activity-panel-pipe-id.start","time":1494.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1497.1000000238419},{"name":"activityTabFullyLoaded","time":1580.7999999523163}],"measures":[],"correlationId":"315f9776679532","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":91,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
MDEV-19505-WIP.patch
is a starting point, against 10.4 as of this writing. It will crash at InnoDB startup because of a dict_table_close() call.