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