Suboptimal buffer pool locking for I_S.INNODB_BUFFER_POOL_PAGES*
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_
for (all buf_pool->chunks)
for (all pages in a chunk)
fill row
buf_pool_
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.
Setting as "Confirmed" due to 1) above. 2) still needs verifying.