Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Binlog flush is serial, and large transactions can take a long time to flush. There are a few serious consequences when large transactions hit the server,
1. large transactions can cause replication lag on slave node;
2. large transactions can trigger large amount of events to be written to the binlog file from the binlog cache, which may stall the master node causing unavailability. And, it also prevents other transactions from writing binlog. In more serious cases, it may cause IO pressure, and the database will hang or even crash.
When the above mentioned scenarios happens, people may not be able to quickly determined the underlying root cause due to insufficient or inexisting monitoring. Therefore, it makes sense to log a warning message in the master error log, when the transaction's binlog cache size exceeds a certain threshold (say 100MB, and it should be configurable).