Non-idempotent retry in ne_begin_request()

Thomas F 4xchu0ouxc33vxi at jetable.net
Mon Jan 4 07:57:00 EST 2010


Hi Joe,

hmm, I'm not convinced yet, see below :-)

Joe Orton schrieb:
> send_request() knows to only return NE_RETRY if it is using a persistent 
> connection - see the "retry" variable.
> The logic here ensures that a 
> persistent connection is closed for a non-idempotent request; so 
> send_request() should never return NE_RETRY there.

It won't return NE_RETRY due to timeout (the close-on-non-idempotent-req
logic prevents that), but it still can NE_RETRY due to server failure,
which means non-idempotent requests may be silently retried.

Let's look at the 4 cases of "retry on server failure" behaviour:

1. non-persistent conn., idempotent req.:     no retry
2. non-persistent conn., non-idempotent req.: no retry
3. persistent conn., idempotent req.:         retry if conn still alive
4. persistent conn., non-idempotent req.:     retry

So, with persistent connection, non-idempotent requests are retried
more aggressively than idempotent ones -- I don't think this was
intended!

Regards,
Thomas



More information about the neon mailing list