Patch: CPU efficiency, UDP support, and other changes

Brad Fitzpatrick brad at danga.com
Tue May 30 19:07:49 UTC 2006


On Tue, 30 May 2006, Steven Grimm wrote:

> Brad Fitzpatrick wrote:
> > Steven,
> >
> > This part doesn't intuitively look right:
> >
> > +            case TRANSMIT_INCOMPLETE:
> > +            case TRANSMIT_HARD_ERROR:
> > +                break;                   /* Continue in state machine. */
> > +
> > +            case TRANSMIT_SOFT_ERROR:
> > +                exit = 1;
> > +                break;
> >
> >
> > Should the HARD/SOFT be reversed?
> >
>
> In the case of TRANSMIT_HARD_ERROR on a TCP connection, the connection
> state is set to "conn_closing", which will cause the state machine to
> close the socket next time through the loop. (That happens in
> transmit().) In the case of TRANSMIT_SOFT_ERROR, we will want to retry
> later, so we exit the "while" loop but don't shut anything down.

Oh, right, thanks.  I'd forgotten the meaning of 'exit' there.  Next time
I'll look a half second before bugging you.  :)

In any case, can you look over the facebook branch?  It should be fully
merged with trunk now, with the exception of a few new features which I
axed for now until I read all the new event loop code and report it.

- Brad


More information about the memcached mailing list