Suboptimal buffer pool locking for I_S.INNODB_BUFFER_POOL_PAGES*

Bug #1056581 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Low
Unassigned
5.5
Triaged
Low
Unassigned
5.6
Fix Released
Low
Unassigned
5.7
Fix Released
Low
Unassigned

Bug Description

5.1 code (5.5 is mostly the same with multiple buf pool instance support):

buf_pool_mutex_enter();

for (all buf_pool->chunks)
   for (all pages in a chunk)
      fill row

buf_pool_mutex_exit();

Issues:
1) Blocks the buffer pool for the whole query duration.
2) After the XtraDB mutex split the blocking does not seem to actually protect the fields it accesses (if one does not count the "protection" provided by the blocked server...).

Suggested fix:
The buf_pool->chunks is allocated at startup and is constant. Thus, we only have to lock individual buffer pages for each I_S result row, or even accept dirty info without any locking. The only other precaution then we need to take is to handle server shutdowns in the middle of I_S query correctly.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Setting as "Confirmed" due to 1) above. 2) still needs verifying.

summary: - Incorrect buffer pool locking for I_S.INNODB_BUFFER_POOL_PAGES
+ Suboptimal buffer pool locking for I_S.INNODB_BUFFER_POOL_PAGES
Revision history for this message
Alexey Kopytov (akopytov) wrote : Re: Suboptimal buffer pool locking for I_S.INNODB_BUFFER_POOL_PAGES

The same applies to I_S.INNODB_BUFFER_POOL_PAGES_BLOB.

summary: - Suboptimal buffer pool locking for I_S.INNODB_BUFFER_POOL_PAGES
+ Suboptimal buffer pool locking for I_S.INNODB_BUFFER_POOL_PAGES*
tags: added: xtradb
tags: added: bp-split
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1938

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.