log_status has wrong binary_log_position of gtid_executed
General
Escalation
General
Escalation
Description
Description: When the server is under heavy write operation ,binary_log_position of gitid_executed shown in log_status doesn't match with the position of that gitd shown in the binary log file.
How to repeat: Run below load sysbench /usr/local/Cellar/sysbench/1.0.20/share/sysbench/oltp_insert.lua --mysql-db=test --mysql-user=root --mysql-socket=$SOCKET --threads=10 --time=1500 --report-interval=1 --events=0 --db-driver=mysql prepare
Query binary_log_position and gtid_executed from log_status table.
position of the GTID in binlog file is different from what is shown above
When log_status query tries to take write lock on global_sid_lock, it will wait until all reader threads to finish updating the executed gtids structure. But these client threads, after updating the executed_gtids are allowed to execute, till they wait for the lock on the binary log to update the log position.
Since, the required lock is held by the log_status query, we will always get the consistent binlog file and the position, but we may not always get the consistent executed_gtids if there are already some threads updating it when log_status query tries to acquire the write lock on the global_sid_lock.
Description:
When the server is under heavy write operation
,binary_log_position of gitid_executed shown in log_status doesn't match with the position of that gitd shown in the binary log file.
How to repeat:
Run below load
sysbench /usr/local/Cellar/sysbench/1.0.20/share/sysbench/oltp_insert.lua --mysql-db=test --mysql-user=root --mysql-socket=$SOCKET --threads=10 --time=1500 --report-interval=1 --events=0 --db-driver=mysql prepare
Query binary_log_position and gtid_executed from log_status table.
position of the GTID in binlog file is different from what is shown above