Bug #120549 (Contribution) optimizing of binlogging of large transactions

Submitted: 26 May 5:29
Reporter: Libing Song (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[26 May 5:29] Libing Song
Description:
For transactions whose binlog payload exceeds `binlog_cache_size`, MySQL today
spills the binlog cache to a temporary file on disk. At commit time, this
temporary file is read back into memory and written out into the active binary
log file. For large transactions (multi-GB DDL, large bulk loads,
INSERT ... SELECT, etc.) this means the same data is written to disk twice and
hold the LOCK_log mutex long time. It generates significant disk and
page-cache pressure and stalling all other writes for the duration of the copy.

This feature replaces that read-then-write cycle with a single rename. It
renames the binlog cache file of large transaction to a binlog file directly
. With this optimization, the commit of large transactions will be very fast, it
will not stall other writes.

It has been contributed to MariaDB. For detail please check: https://mariadb.com/resources/blog/binlog-commit-optimization-for-large-transaction/

How to repeat:
Not applicable to a Feature Request.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.