You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Feature] Issue#3 OPTMIZE AND BUGFIX LOG_WRITE_UP_TO
optimize log_write_up_to, port from upstream
===================
Committer: Yasufumi Kinoshita
Date: 2013-10-17 10:05:54 UTC
Revision ID: [email protected]
WL#7050 - InnoDB: Refactor redo log write code for better performance
- This is rewrite of log_write_up_to() to improve its performance in case where
innodb_flush_log_at_trx_commit = 2.
In log_write_up_to():
* Remove wait mode. We always wait with one exception. And that is when doing log
sync from master thread. It makes that synchronous as well because that happens
only once per second.
* Because we only have one log group therefore we don't need two flush_events.
* Remove unnecessary fields like written_to_some_lsn, written_to_all_lsn.
* If only write is requested we don't have to acquire the log_sys::mutex after we
release it. We currently do that only to do event handling but event handling is
really only needed in case where flush is requested i.e.: a thread should be
waiting on the event iff it is interested in flushing. Writes are serialized under
log_sys::mutex.
This patch was originally written by Inaam Rana.
rb#2389 Approved by Sunny and Yasufumi
===========
Adjustment for performance was done therough inherited rb#3373
- optimize log_write_up_to() more
* remove the second log_sys->mutex obtain also for "innodb_flush_log_at_trx_commit = 1" path
* remove unnecessary ut_memcpy. (because log_group_write_buf() is protected by log_sys->mutex)
* remove dirty-read from flush_to_disk=true case. (to avoid regression at some cases)
(to keep current arbitration for write/fsync contention between log and data file)
* fix wrong handling of O_DSYNC
- revive log_buffer_sync_in_background(). (because it needs to be used)
Bugfix:
===================
bug#73109, skip redo log write when log_sys->buf_free is equal to log_sys->buf_next_to_write
0 commit comments