Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
2.8.2
-
None
-
Security Level: Public
-
None
Description
Current unlock implementation does not read the response and do anything with it. It simply says okay for any received responses.
Tests and implementation should check for the various responses expected. This should be documented somewhere and implementation should follow the documentation, but just to show what the current server implementation is I plucked this out of the server code for ep_engine:
ENGINE_ERROR_CODE rv = e->unlockKey(key, vbucket, cas, ep_current_time());
if (rv == ENGINE_SUCCESS)
{ *msg = "UNLOCKED"; }else if (rv == ENGINE_TMPFAIL)
{ *msg = "UNLOCK_ERROR"; res = PROTOCOL_BINARY_RESPONSE_ETMPFAIL; } else {
if (e->isDegradedMode())
RCPtr<VBucket> vb = e->getVBucket(vbucket);
if (!vb)
*msg = "NOT_FOUND";
res = PROTOCOL_BINARY_RESPONSE_KEY_ENOENT;
}
Attachments
Gerrit Reviews
For Gerrit Dashboard: SPY-97 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
19538,4 | Fixed failing Unlock test | master | spymemcached | Status: MERGED | +2 | +1 |