List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:January 15 2009 9:50am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (davi:2728) Bug#40536
View as plain text  
Hi, Davi!

On Jan 13, Davi Arnaut wrote:
> On 1/13/09 3:57 PM, Sergei Golubchik wrote:
>> On Jan 06, Davi Arnaut wrote:
>>>   2728 Davi Arnaut	2009-01-06
>>>        Bug#40536: SELECT is blocked by INSERT DELAYED waiting on
>>>                   upgrading lock, even with low_pri
>>>
>>>        The problem is that there is no mechanism to control whether a
>>>        delayed insert takes a high or low priority lock on a table.
>>>
>>>        The solution is to add a new global variable which specifies
>>>        whether a delayed insert thread should take high or low priority
>>>        locks. The name of the variable is low_priority_delayed_updates.
>>
>> I think this new feature is uncalled for.
>> Why don't you use low_priority_updates ?
>
> Because the session value of the variable wouldn't be meaningful, which 

Not necessarily.
When a delayed insert is created it could take the value of
low_priority_updates from the thread that issued INSERT DELAYED.

I think this is a desired behaviour. But my preference isn't too strong,
and if it'd be difficult to implement, feel free to use the global value
of low_priority_updates.

> requires the global value to be used and such change could create some 
> confusion for cases where the session value of the variable differs from 
> the global one.
>
> Another thing is that one won't know the point in time that a ?handler? 
> thread will acquire the lock, so the variable will probably stay set for 
> long periods.. which conflicts with the finer grained behavior of 
> low_priority_updates.

It's logically follow with the asynchronous model of INSERT DELAYED.
One cannot communicate with it after a thread is created - nor change
the priority, nor obtain the results (number of inserted rows, number of
conflicts).

Regards / Mit vielen Grüßen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Engineer/Server Architect
/_/  /_/\_, /___/\___\_\___/  Sun Microsystems GmbH, HRB München 161028
       <___/                  Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring
Thread
bzr commit into mysql-5.1-bugteam branch (davi:2728) Bug#40536Davi Arnaut6 Jan 2009
  • Re: bzr commit into mysql-5.1-bugteam branch (davi:2728) Bug#40536Sergei Golubchik13 Jan 2009
    • Re: bzr commit into mysql-5.1-bugteam branch (davi:2728) Bug#40536Davi Arnaut14 Jan 2009
      • Re: bzr commit into mysql-5.1-bugteam branch (davi:2728) Bug#40536Konstantin Osipov14 Jan 2009
      • Re: bzr commit into mysql-5.1-bugteam branch (davi:2728) Bug#40536Sergei Golubchik15 Jan 2009
        • Re: bzr commit into mysql-5.1-bugteam branch (davi:2728) Bug#40536Davi Arnaut15 Jan 2009