-
Notifications
You must be signed in to change notification settings - Fork 26
Description
- Reported as: lp:1540680
- Reported by: lp:~skrulx
- Reported at: 2016-02-02T00:34:37Z
Imported from Launchpad using lp2gh.
Attached to this bug report is an example program showing that, when memcached successfully connects to a server, but that server is unresponsive to commands, the memcached_get function will return MEMCACHED_NOTFOUND rather than MEMCACHED_TIMEOUT.
The output is:
$ LD_LIBRARY_PATH=./libmemcached/.libs ./bug
memcached_lib_version 1.0.18
Connection accepted, now do nothing...
value: (null) error: NOT FOUND
last_error_message (0x6cc140) A TIMEOUT OCCURRED, No active_fd were found, host: localhost:11911 -> libmemcached/io.cc:259
I believe the problem stems from clobbering the timeout return in fetch.cc:
http://bazaar.launchpad.net/~tangent-trunk/libmemcached/1.0/view/head:/libmemcached/fetch.cc#L255
At this point, error is MEMCACHED_TIMEOUT but the result count is also zero, so the code decides it should be MEMCACHED_NOTFOUND instead.
Note that memcached_get did indeed return MEMCACHED_TIMEOUT way back in libmemcached-0.32.