-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
get returns NOTFOUND on timeout #67
Comments
|
Ironically just been looking at this in the original libmemcached 1.0.18 and then stumbled on this github project and thought exactly the same. I can't see any reason at all for that code line that converts an empty result into NOTFOUND, since unless I've missed something the error state is always set to something sensible by that point. So I'm now running a locally modified version with that bit removed entirely and all is well so far. |
Fixed in 9f88736 |
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.
The text was updated successfully, but these errors were encountered: