I have configured a MariaDB 10.2.4 GTID Slave with master_delay=3600, and it seems to cause replication to lag behind more and more. Waits trigger even though Seconds_Behind_Master is > 3600.
Hi tanj
I have created a patch for this issue which solves this wrong timestamp issue, This is because when binlog_background thread logs BInlog_checkpoint_log_event time is not set in the thread so , Binlog_checkpoint_log_event->when is zero.
But I am not able to simulate seconds behind master case. Can you please provide some reproducible test case ?
I tried this
master - slave configuration
both use binlog_format = row
I have used gtid
sql_delay=60
And run lacs of (insert )query on server 1 , with after every 10 insert there was flush logs
Sachin Setiya (Inactive)
added a comment - Hi tanj
I have created a patch for this issue which solves this wrong timestamp issue, This is because when binlog_background thread logs BInlog_checkpoint_log_event time is not set in the thread so , Binlog_checkpoint_log_event->when is zero.
But I am not able to simulate seconds behind master case. Can you please provide some reproducible test case ?
I tried this
master - slave configuration
both use binlog_format = row
I have used gtid
sql_delay=60
And run lacs of (insert )query on server 1 , with after every 10 insert there was flush logs
patch
Doesn't the set_time() need to go inside the loop, before the call to
mysql_bin_log.mark_xid_done()? Otherwise the time will always be the time
the binlog thread started, which is not correct - it needs to be the current
time.
But nice catch, good to get this fixed.
Kristian Nielsen
added a comment - Doesn't the set_time() need to go inside the loop, before the call to
mysql_bin_log.mark_xid_done()? Otherwise the time will always be the time
the binlog thread started, which is not correct - it needs to be the current
time.
But nice catch, good to get this fixed.
I am experiencing this issue when attaching a 10.2.8 Slave to a 10.0.24 Master. At every #700101 Binlog checkpoint event, the SQL Delay counter is reapplied and the Slave is continually delayed.
master# mysql -e 'select @@version;'
-----------------
@@version
-----------------
10.0.24-MariaDB
-----------------
master# mysqlbinlog bin-log.023901 | grep ^#700
#700101 2:00:00 server id 123 end_log_pos 423 Binlog checkpoint bin-log.023901
slave# mysql -e 'select @@version;'
--------------------
@@version
--------------------
10.2.8-MariaDB-log
--------------------
Seconds_Behind_Master: 2170
SQL_Delay: 900
SQL_Remaining_Delay: 825
Slave_SQL_Running_State: Waiting until MASTER_DELAY seconds after master executed event
Even if the Master is upgraded to 10.0.32 (latest), the bogus timestamps will still be present - as confirmed in a sandbox:
../sandbox.sh mysql -e 'select @@version;'
-----------------
@@version
-----------------
10.0.32-MariaDB
-----------------
mysqlbinlog bin-log.00000* | grep ^#700
#700101 2:00:00 server id 10032 end_log_pos 347 Binlog checkpoint bin-log.000002
#700101 2:00:00 server id 10032 end_log_pos 347 Binlog checkpoint bin-log.000003
Marcus Zambrano
added a comment - I am experiencing this issue when attaching a 10.2.8 Slave to a 10.0.24 Master. At every #700101 Binlog checkpoint event, the SQL Delay counter is reapplied and the Slave is continually delayed.
master# mysql -e 'select @@version;'
-----------------
@@version
-----------------
10.0.24-MariaDB
-----------------
master# mysqlbinlog bin-log.023901 | grep ^#700
#700101 2:00:00 server id 123 end_log_pos 423 Binlog checkpoint bin-log.023901
slave# mysql -e 'select @@version;'
--------------------
@@version
--------------------
10.2.8-MariaDB-log
--------------------
Seconds_Behind_Master: 2170
SQL_Delay: 900
SQL_Remaining_Delay: 825
Slave_SQL_Running_State: Waiting until MASTER_DELAY seconds after master executed event
Even if the Master is upgraded to 10.0.32 (latest), the bogus timestamps will still be present - as confirmed in a sandbox:
../sandbox.sh mysql -e 'select @@version;'
-----------------
@@version
-----------------
10.0.32-MariaDB
-----------------
mysqlbinlog bin-log.00000* | grep ^#700
#700101 2:00:00 server id 10032 end_log_pos 347 Binlog checkpoint bin-log.000002
#700101 2:00:00 server id 10032 end_log_pos 347 Binlog checkpoint bin-log.000003
This patched was pushed only to 10.2, I have back-ported this patch to 10.0 , by this merge this will also be available to 10.1.
Sachin
Sachin Setiya (Inactive)
added a comment - Hi zam1081 !
This patched was pushed only to 10.2, I have back-ported this patch to 10.0 , by this merge this will also be available to 10.1.
Sachin
People
Sachin Setiya (Inactive)
Guillaume Lefranc
Votes:
1Vote for this issue
Watchers:
8Start 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":872.5,"ttfb":319.89999997615814,"pageVisibility":"visible","entityId":60611,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"901be86e-46bf-4803-8e27-2918f08af983","navigationType":0,"readyForUser":949.2000000476837,"redirectCount":0,"resourceLoadedEnd":1152,"resourceLoadedStart":325.7000000476837,"resourceTiming":[{"duration":23.199999928474426,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":325.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":325.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":348.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":23.800000071525574,"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":325.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":325.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":349.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":90,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":326.10000002384186,"connectEnd":326.10000002384186,"connectStart":326.10000002384186,"domainLookupEnd":326.10000002384186,"domainLookupStart":326.10000002384186,"fetchStart":326.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":326.10000002384186,"responseEnd":416.10000002384186,"responseStart":416.10000002384186,"secureConnectionStart":326.10000002384186},{"duration":195.20000004768372,"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":326.2999999523163,"connectEnd":326.2999999523163,"connectStart":326.2999999523163,"domainLookupEnd":326.2999999523163,"domainLookupStart":326.2999999523163,"fetchStart":326.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":326.2999999523163,"responseEnd":521.5,"responseStart":521.5,"secureConnectionStart":326.2999999523163},{"duration":199.10000002384186,"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":326.60000002384186,"connectEnd":326.60000002384186,"connectStart":326.60000002384186,"domainLookupEnd":326.60000002384186,"domainLookupStart":326.60000002384186,"fetchStart":326.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":326.60000002384186,"responseEnd":525.7000000476837,"responseStart":525.7000000476837,"secureConnectionStart":326.60000002384186},{"duration":199.40000009536743,"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":326.7999999523163,"connectEnd":326.7999999523163,"connectStart":326.7999999523163,"domainLookupEnd":326.7999999523163,"domainLookupStart":326.7999999523163,"fetchStart":326.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":326.7999999523163,"responseEnd":526.2000000476837,"responseStart":526.2000000476837,"secureConnectionStart":326.7999999523163},{"duration":199.70000004768372,"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":326.89999997615814,"connectEnd":326.89999997615814,"connectStart":326.89999997615814,"domainLookupEnd":326.89999997615814,"domainLookupStart":326.89999997615814,"fetchStart":326.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":326.89999997615814,"responseEnd":526.6000000238419,"responseStart":526.6000000238419,"secureConnectionStart":326.89999997615814},{"duration":231.29999995231628,"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":327.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":327.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":558.3999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":199.80000007152557,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":327.2999999523163,"connectEnd":327.2999999523163,"connectStart":327.2999999523163,"domainLookupEnd":327.2999999523163,"domainLookupStart":327.2999999523163,"fetchStart":327.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":327.2999999523163,"responseEnd":527.1000000238419,"responseStart":527.1000000238419,"secureConnectionStart":327.2999999523163},{"duration":231.10000002384186,"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":327.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":327.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":558.6000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":200.09999990463257,"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":327.7000000476837,"connectEnd":327.7000000476837,"connectStart":327.7000000476837,"domainLookupEnd":327.7000000476837,"domainLookupStart":327.7000000476837,"fetchStart":327.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":327.7000000476837,"responseEnd":527.7999999523163,"responseStart":527.7999999523163,"secureConnectionStart":327.7000000476837},{"duration":811.7000000476837,"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":328.39999997615814,"connectEnd":328.39999997615814,"connectStart":328.39999997615814,"domainLookupEnd":328.39999997615814,"domainLookupStart":328.39999997615814,"fetchStart":328.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":328.39999997615814,"responseEnd":1140.1000000238419,"responseStart":1140.1000000238419,"secureConnectionStart":328.39999997615814},{"duration":812.6000000238419,"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":328.5,"connectEnd":328.5,"connectStart":328.5,"domainLookupEnd":328.5,"domainLookupStart":328.5,"fetchStart":328.5,"redirectEnd":0,"redirectStart":0,"requestStart":328.5,"responseEnd":1141.1000000238419,"responseStart":1141.1000000238419,"secureConnectionStart":328.5},{"duration":246.30000007152557,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":569.8999999761581,"connectEnd":569.8999999761581,"connectStart":569.8999999761581,"domainLookupEnd":569.8999999761581,"domainLookupStart":569.8999999761581,"fetchStart":569.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":569.8999999761581,"responseEnd":816.2000000476837,"responseStart":816.2000000476837,"secureConnectionStart":569.8999999761581},{"duration":315.6999999284744,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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":827.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":827.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1142.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":317.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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":828.1000000238419,"connectEnd":828.1000000238419,"connectStart":828.1000000238419,"domainLookupEnd":828.1000000238419,"domainLookupStart":828.1000000238419,"fetchStart":828.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":828.1000000238419,"responseEnd":1145.6000000238419,"responseStart":1145.6000000238419,"secureConnectionStart":828.1000000238419},{"duration":323.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/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":828.3999999761581,"connectEnd":828.3999999761581,"connectStart":828.3999999761581,"domainLookupEnd":828.3999999761581,"domainLookupStart":828.3999999761581,"fetchStart":828.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":828.3999999761581,"responseEnd":1152,"responseStart":1152,"secureConnectionStart":828.3999999761581},{"duration":303,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":866.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":866.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1169.2000000476837,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":144,"responseStart":320,"responseEnd":322,"domLoading":323,"domInteractive":1171,"domContentLoadedEventStart":1171,"domContentLoadedEventEnd":1213,"domComplete":1311,"loadEventStart":1311,"loadEventEnd":1312,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1146.7000000476837},{"name":"bigPipe.sidebar-id.end","time":1147.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.start","time":1147.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1149.2000000476837},{"name":"activityTabFullyLoaded","time":1274.3999999761581}],"measures":[],"correlationId":"5d006bec4541fa","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Hi tanj
I have created a patch for this issue which solves this wrong timestamp issue, This is because when binlog_background thread logs BInlog_checkpoint_log_event time is not set in the thread so , Binlog_checkpoint_log_event->when is zero.
But I am not able to simulate seconds behind master case. Can you please provide some reproducible test case ?
I tried this
master - slave configuration
both use binlog_format = row
I have used gtid
sql_delay=60
And run lacs of (insert )query on server 1 , with after every 10 insert there was flush logs
patch