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
For Gerrit Dashboard: MB-32660 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
103660,1 | MB-32660: Return success when resetting append statemachine | vulcan | kv_engine | Status: ABANDONED | -1 | +1 |
103671,2 | MB-32660: Return success when resetting append statemachine | vulcan | kv_engine | Status: MERGED | +2 | +1 |
103696,3 | MB-32686: Merge remote-tracking branch 'couchbase/vulcan' | alice | kv_engine | Status: MERGED | +2 | +1 |
103962,2 | Merge remote-tracking branch 'couchbase/alice' | master | kv_engine | Status: MERGED | +2 | +1 |