Skip to content

Memcache: Set result code on successful getMulti/peekMulti #115

Description

@javiermarinros

getMultiInternal() only assigns result_code in its error path, so a successful multi-get reports whatever result code was left behind by the previous operation. In particular, a failed add() (RES_NOTSTORED — a routine occurrence when add() is used as a lock primitive) makes every subsequent getMulti()/peekMulti() look like a failure to callers that check getResultCode() to validate the operation, even though the call returned valid data.

Every other operation (get, set, add, deleteMulti, increment, flush) already updates the result code on success; this brings getMultiInternal() in line by setting RES_SUCCESS once the Get RPC completes.

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