Patch: CPU efficiency, UDP support, and other changes

Steven Grimm sgrimm at facebook.com
Tue May 30 18:11:19 UTC 2006


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.

-Steve


More information about the memcached mailing list