Details
-
Type:
Bug
-
Status: Stalled
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 10.0
-
Fix Version/s: N/A
-
Component/s: Replication
-
Labels:None
Description
I am not sure how parallel replication impacts SBM calculation but the computation is obviously wrong when using parallel threads.
SBM should be (imho) calculated by comparing the timestamp of the currently executed event in the binary log to the current datetime. I understand that there might be issues when executing events in parallel however that should work for most cases.
simple reproducer:
<pre>
#stop perfectly working slave
STOP SLAVE;
SELECT SLEEP(10);
START SLAVE;
SHOW PROCESSLIST\G
MariaDB(db-02)[(none)]> SHOW PROCESSLIST\G
*************************** 1. row ***************************
Id: 3
User: system user
Host:
db: NULL
Command: Connect
Time: 10
State: Waiting for work from SQL thread
Info: NULL
Progress: 0.000
*************************** 2. row ***************************
Id: 4
User: system user
Host:
db: NULL
Command: Connect
Time: 10
State: Waiting for work from SQL thread
Info: NULL
Progress: 0.000
*************************** 3. row ***************************
SHOW SLAVE STATUS\G
Seconds_Behind_Master: 0
SBM first reports 0 then will increase monotonically from this point until it reaches the actual delay value (whatever is reported in "Time" for a worker thread in the processlist, for example).
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Hi,
From the description it sounds like regular behavior with somewhat slow-ish IO thread: the slave starts, it takes time to read an event from master during which periods the SQL thread(s) are idle, and thus SBM is 0, then an SQL thread gets the even and SBM gets updated and starts increasing.
But I might have missed something in your description.
Could you please paste, attach or upload the PROCESSLIST output for all replication-related threads, and also full SHOW SLAVE STATUS output?
Thanks.