Details
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
- backports to
-
MB-32660 [BP 5.5.4] - Append with CAS=0 can return ENGINE_KEY_EEXISTS
- Closed