Merge lp:~akopytov/percona-server/bug1163262-5.5 into lp:percona-server/5.5
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Laurynas Biveinis | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 492 | ||||
Proposed branch: | lp:~akopytov/percona-server/bug1163262-5.5 | ||||
Merge into: | lp:percona-server/5.5 | ||||
Diff against target: |
137 lines (+56/-4) 4 files modified
Percona-Server/storage/innobase/include/buf0flu.ic (+1/-1) Percona-Server/storage/innobase/include/mtr0mtr.h (+2/-0) Percona-Server/storage/innobase/include/mtr0mtr.ic (+21/-0) Percona-Server/storage/innobase/mtr/mtr0mtr.c (+32/-3) |
||||
To merge this branch: | bzr merge lp:~akopytov/percona-server/bug1163262-5.5 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurynas Biveinis (community) | Approve | ||
Registry Administrators | Pending | ||
Review via email: mp+156630@code.launchpad.net |
Description of the change
Bug #1163262: Unnecessary log_flush_
log_
reduce contention on log_sys->mutex. On a mini-transaction commit
InnoDB adds modified pages to the flush list and uses
log_
flush list in the correct LSN order.
One thing that was handled inefficiently wrt. that mutex is that it was
acquired even if no modifications from a mini-transaction had to be
added to flush list, i.e. when an mtr has only modified dirty pages
(if any). This unnecessarily increased contention on
log_
write-intensive workloads, because the former is acquired with the
latter locked.
The problem is fixed in MySQL 5.6 with the following revision:
http://
This is a backport of that change to Percona Server 5.5.
http://
The patch introduces a new function mtr_block_ dirtied( ). Its definition is provided in mtr0log.c, it's a small function, and has only one caller in in mtr_memo_push(), which is defined in mtr0mtr.ic. Surely this means that we want mtr_block_dirtied() defined as a static inline function in mtr0mtr.ic as well?