Skip to content

delete returns nonzero on NOT_FOUND #51

@dropwhile

Description

@dropwhile

It appears that delete will return nonzero even on failure (NOT_FOUND server response). This appears to violate the api description that says "@return: Nonzero on success." The memecached text protocol defines only 'DELETED' as "success", and 'NOT_FOUND' to indicate the server did not have the key at the time the delete was requested -- and records this in server stats as 'delete_misses'.

The fix is trivial (simply remove NOT_FOUND from the expect list for delete), and I was going to just open a pull req for it, but there appears to be some history behind the decision.

It appears this change was part of 81933bc and related to an old-bug (at least this is the bug referenced in the commit).

Is there historical/deeper meaning surrounding this change?
Is it a bug or just a kludge to maintain some pre-existing behavior (e.g. api stability)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions