Bug #120774 replication worker thread dealock
Submitted: 25 Jun 12:16
Reporter: Smith Tim Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:8.4.8 OS:Linux
Assigned to: CPU Architecture:Any

[25 Jun 12:16] Smith Tim
Description:
I encounter that replication worker threads get stuck frequently due to deadlock between worker threads. After analyzing the issue, I find someone has already written an article https://medium.com/@slow_tech/case-study-why-mysql-parallel-replication-can-be-slower-than... about the root cause.

How to repeat:
Please refer to the reproduce steps at the article https://medium.com/@slow_tech/case-study-why-mysql-parallel-replication-can-be-slower-than....

Suggested fix:
Given that users could not prevent deadlock between replication worker threads, MySQL should have a way to prevent it. Alternatively, at least break the deadlock immediately instead of waiting for the timeout passively.