The function mlog_write_ulint() writes 1, 2, 4, or 8 bytes to an index page and to the redo log buffer of a mini-transaction. The following interface ought to be more suitable for future refactoring:
/** Write request types */
enum write_type
{
/** the page is guaranteed to always change */
NORMAL= 0,
/** optional: the page contents might not change */
OPT,
/** force a write, even if the page contents is not changing */
inlinevoid write(const buf_block_t &block, byte *ptr, V val)
MY_ATTRIBUTE((nonnull));
The write_type allows redundant writes to be optimized away. Passing buf_block_t will allow the function mlog_write_initial_log_record_fast() to be replaced with the even faster mlog_write_initial_log_record_low(), and it could also allow the mtr_t::m_memo and mtr_t::m_log to be replaced with a std::map<buf_block_t&,log_t>.
As part of this task, I replaced some more use of mlog_write_initial_log_record_fast() with the more efficient mlog_write_initial_log_record_low(), and replaced some page_get_page_no() calls with references to buf_page_t::id.
Marko Mäkelä
added a comment - As part of this task, I replaced some more use of mlog_write_initial_log_record_fast() with the more efficient mlog_write_initial_log_record_low() , and replaced some page_get_page_no() calls with references to buf_page_t::id .
People
Marko Mäkelä
Marko Mäkelä
Votes:
0Vote for this issue
Watchers:
1Start 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":1152.1999998092651,"ttfb":280.7999997138977,"pageVisibility":"visible","entityId":80757,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"c2758b27-69f1-4ebb-8e09-9bbfa65689e0","navigationType":0,"readyForUser":1269.1999998092651,"redirectCount":0,"resourceLoadedEnd":824.9000000953674,"resourceLoadedStart":296.40000009536743,"resourceTiming":[{"duration":43.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":296.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":296.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":339.5,"responseStart":0,"secureConnectionStart":0},{"duration":43.200000286102295,"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":296.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":296.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":339.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":321.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":296.90000009536743,"connectEnd":296.90000009536743,"connectStart":296.90000009536743,"domainLookupEnd":296.90000009536743,"domainLookupStart":296.90000009536743,"fetchStart":296.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":347.90000009536743,"responseEnd":618.5999999046326,"responseStart":378.19999980926514,"secureConnectionStart":296.90000009536743},{"duration":480.69999980926514,"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":297.09999990463257,"connectEnd":297.09999990463257,"connectStart":297.09999990463257,"domainLookupEnd":297.09999990463257,"domainLookupStart":297.09999990463257,"fetchStart":297.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":339,"responseEnd":777.7999997138977,"responseStart":357.09999990463257,"secureConnectionStart":297.09999990463257},{"duration":85.40000009536743,"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":297.2999997138977,"connectEnd":297.2999997138977,"connectStart":297.2999997138977,"domainLookupEnd":297.2999997138977,"domainLookupStart":297.2999997138977,"fetchStart":297.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":348.09999990463257,"responseEnd":382.69999980926514,"responseStart":379,"secureConnectionStart":297.2999997138977},{"duration":103.2999997138977,"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":297.5,"connectEnd":297.5,"connectStart":297.5,"domainLookupEnd":297.5,"domainLookupStart":297.5,"fetchStart":297.5,"redirectEnd":0,"redirectStart":0,"requestStart":354.59999990463257,"responseEnd":400.7999997138977,"responseStart":388.7999997138977,"secureConnectionStart":297.5},{"duration":111.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":297.69999980926514,"connectEnd":297.69999980926514,"connectStart":297.69999980926514,"domainLookupEnd":297.69999980926514,"domainLookupStart":297.69999980926514,"fetchStart":297.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":355.90000009536743,"responseEnd":408.7999997138977,"responseStart":401.19999980926514,"secureConnectionStart":297.69999980926514},{"duration":56.89999961853027,"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":297.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":297.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":354.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":129.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":298.19999980926514,"connectEnd":298.19999980926514,"connectStart":298.19999980926514,"domainLookupEnd":298.19999980926514,"domainLookupStart":298.19999980926514,"fetchStart":298.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":358.2999997138977,"responseEnd":427.5,"responseStart":425.69999980926514,"secureConnectionStart":298.19999980926514},{"duration":56.5,"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":298.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":298.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":354.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":116.7999997138977,"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":298.5,"connectEnd":298.5,"connectStart":298.5,"domainLookupEnd":298.5,"domainLookupStart":298.5,"fetchStart":298.5,"redirectEnd":0,"redirectStart":0,"requestStart":358.69999980926514,"responseEnd":415.2999997138977,"responseStart":404.69999980926514,"secureConnectionStart":298.5},{"duration":520.1000003814697,"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":304.2999997138977,"connectEnd":304.2999997138977,"connectStart":304.2999997138977,"domainLookupEnd":304.2999997138977,"domainLookupStart":304.2999997138977,"fetchStart":304.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":400.90000009536743,"responseEnd":824.4000000953674,"responseStart":815.1999998092651,"secureConnectionStart":304.2999997138977},{"duration":520.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":304.5,"connectEnd":304.5,"connectStart":304.5,"domainLookupEnd":304.5,"domainLookupStart":304.5,"fetchStart":304.5,"redirectEnd":0,"redirectStart":0,"requestStart":450.2999997138977,"responseEnd":824.9000000953674,"responseStart":816.6999998092651,"secureConnectionStart":304.5},{"duration":116.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":762.7999997138977,"connectEnd":762.7999997138977,"connectStart":762.7999997138977,"domainLookupEnd":762.7999997138977,"domainLookupStart":762.7999997138977,"fetchStart":762.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":842.6999998092651,"responseEnd":879.5999999046326,"responseStart":878.7999997138977,"secureConnectionStart":762.7999997138977},{"duration":346.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1054.0999999046326,"connectEnd":1054.0999999046326,"connectStart":1054.0999999046326,"domainLookupEnd":1054.0999999046326,"domainLookupStart":1054.0999999046326,"fetchStart":1054.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1360.1999998092651,"responseEnd":1400.7999997138977,"responseStart":1395.4000000953674,"secureConnectionStart":1054.0999999046326}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":81,"responseStart":281,"responseEnd":304,"domLoading":287,"domInteractive":1347,"domContentLoadedEventStart":1347,"domContentLoadedEventEnd":1412,"domComplete":2075,"loadEventStart":2075,"loadEventEnd":2075,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1326.1999998092651},{"name":"bigPipe.sidebar-id.end","time":1327},{"name":"bigPipe.activity-panel-pipe-id.start","time":1327.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1328.0999999046326},{"name":"activityTabFullyLoaded","time":1426.5}],"measures":[],"correlationId":"cd2f1bf8e11b9c","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":18,"dbConnsTimeInMs":29,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
As part of this task, I replaced some more use of mlog_write_initial_log_record_fast() with the more efficient mlog_write_initial_log_record_low(), and replaced some page_get_page_no() calls with references to buf_page_t::id.