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":1033.6000003814697,"ttfb":317.5,"pageVisibility":"visible","entityId":80757,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d6041437-64f0-4811-9cd8-97fa9d7f3ddb","navigationType":0,"readyForUser":1113.1000003814697,"redirectCount":0,"resourceLoadedEnd":1072.3000001907349,"resourceLoadedStart":323.4000005722046,"resourceTiming":[{"duration":202,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":323.4000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":323.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":525.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":202.30000019073486,"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":323.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":323.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":526.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":254.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":323.9000005722046,"connectEnd":323.9000005722046,"connectStart":323.9000005722046,"domainLookupEnd":323.9000005722046,"domainLookupStart":323.9000005722046,"fetchStart":323.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":323.9000005722046,"responseEnd":578.6000003814697,"responseStart":578.6000003814697,"secureConnectionStart":323.9000005722046},{"duration":316.80000019073486,"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":324.1000003814697,"connectEnd":324.1000003814697,"connectStart":324.1000003814697,"domainLookupEnd":324.1000003814697,"domainLookupStart":324.1000003814697,"fetchStart":324.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":324.1000003814697,"responseEnd":640.9000005722046,"responseStart":640.9000005722046,"secureConnectionStart":324.1000003814697},{"duration":320.5,"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":324.30000019073486,"connectEnd":324.30000019073486,"connectStart":324.30000019073486,"domainLookupEnd":324.30000019073486,"domainLookupStart":324.30000019073486,"fetchStart":324.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":324.30000019073486,"responseEnd":644.8000001907349,"responseStart":644.8000001907349,"secureConnectionStart":324.30000019073486},{"duration":320.69999980926514,"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":324.6000003814697,"connectEnd":324.6000003814697,"connectStart":324.6000003814697,"domainLookupEnd":324.6000003814697,"domainLookupStart":324.6000003814697,"fetchStart":324.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":324.6000003814697,"responseEnd":645.3000001907349,"responseStart":645.3000001907349,"secureConnectionStart":324.6000003814697},{"duration":320.9000005722046,"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":324.80000019073486,"connectEnd":324.80000019073486,"connectStart":324.80000019073486,"domainLookupEnd":324.80000019073486,"domainLookupStart":324.80000019073486,"fetchStart":324.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":324.80000019073486,"responseEnd":645.7000007629395,"responseStart":645.7000007629395,"secureConnectionStart":324.80000019073486},{"duration":397.1000003814697,"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":325,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":325,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":722.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":321.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":325.1000003814697,"connectEnd":325.1000003814697,"connectStart":325.1000003814697,"domainLookupEnd":325.1000003814697,"domainLookupStart":325.1000003814697,"fetchStart":325.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":325.1000003814697,"responseEnd":646.3000001907349,"responseStart":646.3000001907349,"secureConnectionStart":325.1000003814697},{"duration":396.9000005722046,"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":325.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":325.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":722.2000007629395,"responseStart":0,"secureConnectionStart":0},{"duration":321.5,"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":325.4000005722046,"connectEnd":325.4000005722046,"connectStart":325.4000005722046,"domainLookupEnd":325.4000005722046,"domainLookupStart":325.4000005722046,"fetchStart":325.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":325.4000005722046,"responseEnd":646.9000005722046,"responseStart":646.9000005722046,"secureConnectionStart":325.4000005722046},{"duration":722.6999998092651,"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":326.6000003814697,"connectEnd":326.6000003814697,"connectStart":326.6000003814697,"domainLookupEnd":326.6000003814697,"domainLookupStart":326.6000003814697,"fetchStart":326.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":326.6000003814697,"responseEnd":1049.3000001907349,"responseStart":1049.3000001907349,"secureConnectionStart":326.6000003814697},{"duration":745.5999994277954,"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":326.70000076293945,"connectEnd":326.70000076293945,"connectStart":326.70000076293945,"domainLookupEnd":326.70000076293945,"domainLookupStart":326.70000076293945,"fetchStart":326.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":326.70000076293945,"responseEnd":1072.3000001907349,"responseStart":1072.3000001907349,"secureConnectionStart":326.70000076293945},{"duration":316.1000003814697,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":733.8000001907349,"connectEnd":733.8000001907349,"connectStart":733.8000001907349,"domainLookupEnd":733.8000001907349,"domainLookupStart":733.8000001907349,"fetchStart":733.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":733.8000001907349,"responseEnd":1049.9000005722046,"responseStart":1049.9000005722046,"secureConnectionStart":733.8000001907349},{"duration":149.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1176.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":118,"responseStart":318,"responseEnd":321,"domLoading":321,"domInteractive":1241,"domContentLoadedEventStart":1241,"domContentLoadedEventEnd":1288,"domComplete":1478,"loadEventStart":1478,"loadEventEnd":1479,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1221.5},{"name":"bigPipe.sidebar-id.end","time":1222.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1222.9000005722046},{"name":"bigPipe.activity-panel-pipe-id.end","time":1223.8000001907349},{"name":"activityTabFullyLoaded","time":1304.6000003814697}],"measures":[],"correlationId":"2784bf40eb379c","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":139,"dbReadsTimeInMs":30,"dbConnsTimeInMs":41,"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.