Bug #119091 Purge Relaylog Leads To Semi-sync Increased Response even set relay_log_space_limit=0
Submitted: 29 Sep 9:56
Reporter: karry zhang (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[29 Sep 9:56] karry zhang
Description:
I've noticed jitter in semi-synchronous replication. After troubleshooting, I discovered it's caused by a relay log purge. I've also discovered the following historical bugs:

https://bugs.mysql.com/bug.php?id=103943

The MySQL Verification Team previously believed this was not a bug. 

The MySQL Verification Team previously considered this a non-bug. However, I still believe it is a bug because even if relay_log_space_limit is set to 0, meaning that the relay log space is unlimited, the IO thread still needs to wait for the SQL thread to purge the relay log, which is why semi-synchronous replication jitter occurs.

How to repeat:
You can following the method given in https://bugs.mysql.com/bug.php?id=103943

Suggested fix:
The most time consume fuction is mysql_file_delete. It is recommended that this operation not hold log_space_lock.