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.
getMultiInternal()only assignsresult_codein its error path, so a successful multi-get reports whatever result code was left behind by the previous operation. In particular, a failedadd()(RES_NOTSTORED— a routine occurrence whenadd()is used as a lock primitive) makes every subsequentgetMulti()/peekMulti()look like a failure to callers that checkgetResultCode()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 bringsgetMultiInternal()in line by settingRES_SUCCESSonce the Get RPC completes.