Merge lp:~laurynas-biveinis/percona-server/bug1247021 into lp:percona-server/5.6
Status: | Merged |
---|---|
Approved by: | George Ormond Lorch III |
Approved revision: | no longer in the source branch. |
Merged at revision: | 526 |
Proposed branch: | lp:~laurynas-biveinis/percona-server/bug1247021 |
Merge into: | lp:percona-server/5.6 |
Diff against target: |
59 lines (+11/-16) 1 file modified
Percona-Server/storage/innobase/buf/buf0buf.cc (+11/-16) |
To merge this branch: | bzr merge lp:~laurynas-biveinis/percona-server/bug1247021 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
George Ormond Lorch III (community) | g2 | Approve | |
Review via email: mp+196898@code.launchpad.net |
Description of the change
Fix bug 1247021 (Assertion failure in file buf0buf.cc line 3687,
buf_page_
tables).
The issue is buf_page_
mutex split incorrectly, visible in a combination of compressed
tables and multiple active purge threads, in 5.6 only.
In upstream, decrement of watch page fix count in
buf_pool_
page_hash X latch, buffer pool mutex, and possibly block mutex. In
XtraDB, buf_pool_
either a block mutex or the zip mutex.
In upstream, the code path leading to the failing assert temporarily
releases page_hash latch around buf_buddy_alloc() call, which in turn
may release the buffer pool mutex too. If that happens, the watch
page is re-read from the page hash.
In the same code path in XtraDB, the buffer pool mutex was substituted
by the LRU list mutex and the logic was kept the same. Which is
incorrect, because page_hash unlock in itself is enough to necessitate
the page_hash recheck regardless of the LRU list mutex, because of
buf_pool_
Fix by reducing the uses of local variable lru in
buf_page_
buf_buddy_alloc(), and performing the watch_page re-check
unconditionally.
http://
This was originally a G1 MP, so it shouldn't have been set to Approved with a G2 review only. But in a hindsight this is a borderline-G2 MP IMHO, so keeping as Approved.