Skip to content

get returns NOTFOUND on timeout #67

@m6w6

Description

@m6w6

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions