-
Notifications
You must be signed in to change notification settings - Fork 683
Bug - Increase in Innodb_history_list_length #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm glad that this issue was created and hope this issue is immediately attended. I work at Kakao which operates the most prominent messaging service in South Korea. My team integrated the python-mysql-replication for a range of applications. However, given the substantial DML traffic we handle (we have about 48m monthly active users), we observed a surge in |
Overview issue number #430 When using the pymysqlreplication package, there was a recurring issue with the history list length value under the following circumstances: MySQL version 8.x or higher. Continuous execution of DML (Data Manipulation Language) statements. This problem led to a gradual slowing down of SELECT queries. For detailed information, you can refer to the following reference: https://minervadb.xyz/troubleshooting-innodb-history-length-with-hung-mysql-transaction/ As a result, I investigated the problem area and made necessary modifications. After making the changes, you were able to compare the performance before and after the fix, using monitoring tools such as Prometheus and MySQL Exporter. --------- Co-authored-by: davinc71998 <[email protected]> Co-authored-by: sean <[email protected]>
Problem
MySQL 8.0+: The value of Innodb_history_list_length steadily increases after running the program
The increase in Innodb_history_list_length is expected to have the following effects on MySQL
Bug description
python-mysql-replication/pymysqlreplication/binlogstream.py
Lines 638 to 655 in 62a009c
According to the logic written in binlogstream.py
After executing a query through the cursor, the transaction remains in place until the program exits
the transaction is being maintained, the Innodb_history_list_length value will continue to increase when DML is performed.

Solution
After executing the query,
COMMIT
the transaction so that it can be terminated normally.The text was updated successfully, but these errors were encountered: