Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
da47c037
Commit
da47c037
authored
Apr 09, 2024
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed calculating of last_master_timestamp for parallel replication.
This effects the Seconds_Behind_Master value.
parent
3655cefc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
sql/rpl_rli.h
sql/rpl_rli.h
+4
-0
sql/slave.cc
sql/slave.cc
+8
-1
No files found.
sql/rpl_rli.h
View file @
da47c037
...
...
@@ -564,6 +564,10 @@ class Relay_log_info : public Slave_reporting_capability
Guarded by data_lock. Written by the sql thread. Read by client
threads executing SHOW SLAVE STATUS.
This is calculated as:
clock_time_for_event_on_master + clock_difference_between_master_and_slave +
SQL_DELAY.
*/
time_t
sql_delay_end
;
...
...
sql/slave.cc
View file @
da47c037
...
...
@@ -4342,6 +4342,13 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
rli
->
last_inuse_relaylog
->
dequeued_count
)))
&&
event_can_update_last_master_timestamp
(
ev
))
{
/*
This is the first event from the master after the slave was up to date
and has been waiting for new events.
We update last_master_timestamp before executing the event to not
have Seconds_after_master == 0 while executing the event.
last_master_timestamp will be updated again when the event is commited.
*/
if
(
rli
->
last_master_timestamp
<
ev
->
when
)
{
rli
->
last_master_timestamp
=
ev
->
when
;
...
...
@@ -4378,7 +4385,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
Seconds_Behind_Master is zero.
*/
if
(
ev
->
get_type_code
()
!=
FORMAT_DESCRIPTION_EVENT
&&
rli
->
last_master_timestamp
<
ev
->
when
)
rli
->
last_master_timestamp
<
ev
->
when
+
(
time_t
)
ev
->
exec_time
)
rli
->
last_master_timestamp
=
ev
->
when
+
(
time_t
)
ev
->
exec_time
;
DBUG_ASSERT
(
rli
->
last_master_timestamp
>=
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment