Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.5.0, 5.5.1, 5.5.2, 6.0.0
-
Triaged
-
Yes
Description
If the engine returns KEY_EEXISTS in the storeItem phase of the append/prepend statemachine, and no CAS was specified for the operation, the statemachine should be reset and the operation retried. While the current implementation does reset the statemachine, there is a bug in the function causing it to then simply return the KEY_EEXISTS error instead of retrying.
The consequence of this is that clients may be sent back KEY_EEXISTS error code even if they don't specify a CAS; which logically shouldn't happen and hence might confuse the client (given they would not expect to have to handle such a status code).
Workaround
Client should retry the APPEND / PREPEND operation (as if they had used an explicit CAS value in their request).
Attachments
Issue Links
- is a backport of
-
MB-32078 Append with CAS=0 can return ENGINE_KEY_EEXISTS
- Closed