arthurnn / memcached

A Ruby interface to the libmemcached C client
Academic Free License v3.0
432 stars 125 forks source link

Add Memcached::SomeErrorsWereReported to exceptions_to_retry #53

Closed manjuraj closed 13 years ago

manjuraj commented 13 years ago

libmemcached library returns MEMCACHED_SOME_ERRORS when memcached_io_write fails. The correct error should be MEMCACHED_ERRNO, but libmemcached library does not bother to set the cached_errno. Since the write failure might represent a transient error, we should retry requests that failed with MEMCACHED_SOME_ERRORS

evan commented 13 years ago

It is also possible to correct the error reported in libmemcached itself, would that be better?

On Tue, Jul 5, 2011 at 6:32 PM, manjuraj reply@reply.github.com wrote:

libmemcached library returns MEMCACHED_SOME_ERRORS when memcached_io_write fails. The correct error should be MEMCACHED_ERRNO, but libmemcached library does not bother to set the cached_errno. Since the write failure might represent a transient error, we should retry requests that failed with MEMCACHED_SOME_ERRORS

Reply to this email directly or view it on GitHub: https://github.com/fauna/memcached/pull/53

manjuraj commented 13 years ago

MEMCACHED_SOME_ERRORS is used in too many places and even if I replace it with MEMCACHED_ERRNO, we can't get away from retrying request because fundamentally a write error might be transient error which might go away on a retry

evan commented 13 years ago

Go for it. You are already a committer.