- buf_page_cleaner is signaled when the pages are added to the flush list.
- As part of the
MDEV-27774 changes the logic to signal buf_page_cleaner
accidentally got missed due to pass-by-value issue (expected pass-by-reference).
[mtr_t::commit flow would signal page cleaner if there are modified
blocks. The object that captured modified blocks was expected to get
passed by reference but accidentally got passed by value and so
page-cleaner thread was never signaled].
[Non-availability of the flushing of-course has effect on performance as could be observed from the attached graph].
- is caused by
-
MDEV-27774
Reduce scalability bottlenecks in mtr_t::commit()
-
-
Closed
{"report":{"fcp":1112.1999998092651,"ttfb":522.1999998092651,"pageVisibility":"visible","entityId":108447,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"7bd7864c-e74b-4764-b812-cb0a55ff9a19","navigationType":0,"readyForUser":1192.5,"redirectCount":0,"resourceLoadedEnd":928.2999997138977,"resourceLoadedStart":529.4000000953674,"resourceTiming":[{"duration":17.299999713897705,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":529.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":529.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":546.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":17.40000009536743,"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":529.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":529.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":547,"responseStart":0,"secureConnectionStart":0},{"duration":90.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":529.7999997138977,"connectEnd":529.7999997138977,"connectStart":529.7999997138977,"domainLookupEnd":529.7999997138977,"domainLookupStart":529.7999997138977,"fetchStart":529.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":549.4000000953674,"responseEnd":620.0999999046326,"responseStart":565.7999997138977,"secureConnectionStart":529.7999997138977},{"duration":107.19999980926514,"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":530,"connectEnd":530,"connectStart":530,"domainLookupEnd":530,"domainLookupStart":530,"fetchStart":530,"redirectEnd":0,"redirectStart":0,"requestStart":550.9000000953674,"responseEnd":637.1999998092651,"responseStart":572.2999997138977,"secureConnectionStart":530},{"duration":34.60000038146973,"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":530.2999997138977,"connectEnd":530.2999997138977,"connectStart":530.2999997138977,"domainLookupEnd":530.2999997138977,"domainLookupStart":530.2999997138977,"fetchStart":530.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":551.2999997138977,"responseEnd":564.9000000953674,"responseStart":564.0999999046326,"secureConnectionStart":530.2999997138977},{"duration":49.10000038146973,"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":530.2999997138977,"connectEnd":530.2999997138977,"connectStart":530.2999997138977,"domainLookupEnd":530.2999997138977,"domainLookupStart":530.2999997138977,"fetchStart":530.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":552.5999999046326,"responseEnd":579.4000000953674,"responseStart":578.9000000953674,"secureConnectionStart":530.2999997138977},{"duration":65.30000019073486,"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":530.5999999046326,"connectEnd":530.5999999046326,"connectStart":530.5999999046326,"domainLookupEnd":530.5999999046326,"domainLookupStart":530.5999999046326,"fetchStart":530.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":555.4000000953674,"responseEnd":595.9000000953674,"responseStart":595.4000000953674,"secureConnectionStart":530.5999999046326},{"duration":22.200000286102295,"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":530.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":530.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":552.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":76.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":530.9000000953674,"connectEnd":530.9000000953674,"connectStart":530.9000000953674,"domainLookupEnd":530.9000000953674,"domainLookupStart":530.9000000953674,"fetchStart":530.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":557.1999998092651,"responseEnd":607.1999998092651,"responseStart":606.5,"secureConnectionStart":530.9000000953674},{"duration":25.09999990463257,"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":531.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":531.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":556.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":75.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":531.1999998092651,"connectEnd":531.1999998092651,"connectStart":531.1999998092651,"domainLookupEnd":531.1999998092651,"domainLookupStart":531.1999998092651,"fetchStart":531.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":559,"responseEnd":606.5,"responseStart":605.7999997138977,"secureConnectionStart":531.1999998092651},{"duration":382.90000009536743,"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":544.5,"connectEnd":544.5,"connectStart":544.5,"domainLookupEnd":544.5,"domainLookupStart":544.5,"fetchStart":544.5,"redirectEnd":0,"redirectStart":0,"requestStart":575.2999997138977,"responseEnd":927.4000000953674,"responseStart":921.0999999046326,"secureConnectionStart":544.5},{"duration":382.2999997138977,"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":546,"connectEnd":546,"connectStart":546,"domainLookupEnd":546,"domainLookupStart":546,"fetchStart":546,"redirectEnd":0,"redirectStart":0,"requestStart":593.4000000953674,"responseEnd":928.2999997138977,"responseStart":922.4000000953674,"secureConnectionStart":546},{"duration":241.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":837.1999998092651,"connectEnd":837.1999998092651,"connectStart":837.1999998092651,"domainLookupEnd":837.1999998092651,"domainLookupStart":837.1999998092651,"fetchStart":837.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1035.7999997138977,"responseEnd":1079,"responseStart":1078.4000000953674,"secureConnectionStart":837.1999998092651},{"duration":205,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1097.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1097.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1302.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":172.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1123.7999997138977,"connectEnd":1123.7999997138977,"connectStart":1123.7999997138977,"domainLookupEnd":1123.7999997138977,"domainLookupStart":1123.7999997138977,"fetchStart":1123.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1255.9000000953674,"responseEnd":1296.2999997138977,"responseStart":1295.7999997138977,"secureConnectionStart":1123.7999997138977}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":365,"responseStart":522,"responseEnd":546,"domLoading":525,"domInteractive":1254,"domContentLoadedEventStart":1254,"domContentLoadedEventEnd":1298,"domComplete":1590,"loadEventStart":1590,"loadEventEnd":1591,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1229},{"name":"bigPipe.sidebar-id.end","time":1230},{"name":"bigPipe.activity-panel-pipe-id.start","time":1230.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1231.5},{"name":"activityTabFullyLoaded","time":1315.2999997138977}],"measures":[],"correlationId":"3f008bd236e10b","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":92,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thank you! The following code indeed is unreachable because the object rb was being passed by value and not by reference, and only a copy of the mutable data member rb.modified was ever changed:
diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc
index f486c2fe0e7..10f1d6f2d19 100644
--- a/storage/innobase/mtr/mtr0mtr.cc
+++ b/storage/innobase/mtr/mtr0mtr.cc
@@ -462,6 +462,7 @@ void mtr_t::commit()
if (rb.modified)
{
+ ut_error;
mysql_mutex_lock(&buf_pool.flush_list_mutex);
buf_pool.flush_list_requests+= rb.modified;