On Thu, Jul 17, 2008 at 8:57 PM, Brian Aker <[EMAIL PROTECTED]> wrote:
> Hi!
>
> On Jul 17, 2008, at 9:14 AM, MARK CALLAGHAN wrote:
>
>> * what happens when the server reads part of a packet and no more data
>> is ready, does it keep on trying or buffer the partial packet and move
>> on.  If MySQL were written in Scheme then continuations would make
>> such a control flow change possible.
>
> My solution for this IO model is pretty simple, do a set number of retries.
>
> So what is your IO model and the reasons for it?

I want to use the thread pool and we are backporting that to 5.0. I
don't mind if a thread gets blocked on net read/write. It doesn't have
to return to the thread pool at that point to run another command.

We will use read/write calls with timeouts set to the appropriate
values (net_{read,write}_timeout). This gets rid of the setsockopt
calls and setting the alarm and avoids the alarm mutex hotspot. It
also makes the net read/write code simpler.

Are the calls to be retried blocking or non-blocking? You need to do one of:
* implement read/write timeouts in that code
* give up on the connection if the data isn't ready,
* do major surgery to save the state of the network send/receive so
that the thread can handle another connection. My comment about
continuations is motivated by the fact that the net read/write calls
are deep in the call stack.


>
> Cheers,
>        -Brian
>
> --
> _______________________________________________________
> Brian "Krow" Aker, brian at tangent.org
> Seattle, Washington
> http://krow.net/                     <-- Me
> http://tangent.org/                <-- Software
> _______________________________________________________
> You can't grep a dead tree.
>
>
>
>



-- 
Mark Callaghan
[EMAIL PROTECTED]

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : drizzle-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to