← Back to team overview

maria-developers team mailing list archive

Re: Review request: SHOW EXPLAIN

 


> -----Original Message-----
> From: maria-developers-
> bounces+wlad=montyprogram.com@xxxxxxxxxxxxxxxxxxx [mailto:maria-
> developers-bounces+wlad=montyprogram.com@xxxxxxxxxxxxxxxxxxx] On
> Behalf Of Sergei Petrunia
> Sent: Dienstag, 26. Juni 2012 11:45
> To: Sergei Golubchik
> Cc: maria-developers@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Maria-developers] Review request: SHOW EXPLAIN
> 
> Hi Sergei,
> 


> (as discussed on the phone) will try to
> - get the APC mechanism to work always, including ability to wake up
>   threads that are sleeping/waiting.

Hi, 
I'm not sure this use case is meant, but waking up an  idle connection is a
complex problem, if one wants to do it portably and reliably. 

Currently, it works ok for KILL <connection> in 5.5, socket is shut down and
this wakes up a thread. However the problem is that after shutdown the
connection  is not usable anymore, thus shutdown() cannot be used apart from
KILL <connection> context.

On Unix but not on Windows, there is pthread_kill  does not work if
threadpool is in use  (a connection is not stuck in read/recv in this case).
On Windows but not on Unix, there is  IO cancelation, which would work even
with the thread pool, and could be used to wake up an idle connection by
cancelling read io.

But in case of threadpool+Unix I do not see any  good solution for APC. 


Wlad












Follow ups

References