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
For Gerrit Dashboard: MB-32078 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
101916,3 | MB-32078 Return success when resetting append statemachine | master | kv_engine | Status: ABANDONED | +2 | -1 |
101959,5 | MB-32078 Return success when resetting append statemachine | alice | kv_engine | Status: MERGED | +2 | +1 |
102304,2 | Merge branch 'alice' | master | kv_engine | Status: ABANDONED | +2 | +1 |
102369,1 | Merge branch 'alice' | master | kv_engine | Status: MERGED | +2 | +1 |
103192,2 | verification for MB-32078 | master | testrunner | Status: MERGED | +2 | +1 |
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 |