← Back to team overview

enterprise-support team mailing list archive

[Bug 1525215] [NEW] buf_pool_resize can lock less in checking whether AHI is on or off

 

Public bug reported:

Copy of https://bugs.mysql.com/bug.php?id=78894:

[21 Oct 7:07] Laurynas Biveinis
Description:
void
buf_pool_resize()
{
...
	btr_search_s_lock_all();
	if (btr_search_enabled) {
		btr_search_s_unlock_all();
		btr_search_disabled = true;
	} else {
		btr_search_s_unlock_all();
	}
...

So, it S-latches all the partitions to read btr_search_enabled. But
btr_search_enable/disable X-latches all the partitions to change its
value. So here it is not required to latch all the partitions, any
single one of them is enough.

How to repeat:
Code analysis

Suggested fix:
S-latch only the first or the last or any random partition.

** Affects: mysql-server
     Importance: Unknown
         Status: Unknown

** Affects: percona-server
     Importance: Undecided
         Status: Invalid

** Affects: percona-server/5.1
     Importance: Undecided
         Status: Invalid

** Affects: percona-server/5.5
     Importance: Undecided
         Status: Invalid

** Affects: percona-server/5.6
     Importance: Undecided
         Status: Invalid

** Affects: percona-server/5.7
     Importance: Low
     Assignee: Laurynas Biveinis (laurynas-biveinis)
         Status: Fix Released


** Tags: innodb performance upstream

** Also affects: percona-server/5.7
   Importance: Undecided
       Status: New

** Also affects: percona-server/5.6
   Importance: Undecided
       Status: New

** Also affects: percona-server/5.1
   Importance: Undecided
       Status: New

** Also affects: percona-server/5.5
   Importance: Undecided
       Status: New

** Changed in: percona-server/5.1
       Status: New => Invalid

** Changed in: percona-server/5.5
       Status: New => Invalid

** Changed in: percona-server/5.6
       Status: New => Invalid

** Changed in: percona-server/5.7
       Status: New => Fix Released

** Changed in: percona-server/5.7
   Importance: Undecided => Low

** Changed in: percona-server/5.7
     Assignee: (unassigned) => Laurynas Biveinis (laurynas-biveinis)

** Tags added: innodb performance upstream

** Bug watch added: MySQL Bug System #78894
   http://bugs.mysql.com/bug.php?id=78894

** Also affects: mysql-server via
   http://bugs.mysql.com/bug.php?id=78894
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1525215

Title:
  buf_pool_resize can lock less in checking whether AHI is on or off

To manage notifications about this bug go to:
https://bugs.launchpad.net/mysql-server/+bug/1525215/+subscriptions