Details
Description
[Cloned this from MB-33813 to track merging a fix for this issue to 6.0.2.]
There is a race condition in ArithmeticCommandContext where a SET operation is performed between the ArithmeticCommandContext::getItem() and ArithmeticCommandContext::storeNewItem(), causing the call to bucket_store() to return ENGINE_NOT_STORED. Currently we just return this error to the memcached client however, this brakes the behaviour of this interface that existed before the refactoring of our arithmetic operations (see v4.5.0). Thus, we should resolve this race condition by trying to re-perform the arithmetic operation by resetting the ArithmeticCommandContext state machine.
Attachments
Issue Links
- is a backport of
-
MB-33813 Memcached returns NOT_STORED to client after trying to perform arithmetic operation
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
There is a race condition in {{ArithmeticCommandContext}} where a {{SET}} operation is performed between the {{ArithmeticCommandContext::getItem()}} and {{ArithmeticCommandContext::storeNewItem()}}, causing the call to {{bucket_store()}} to return {{ENGINE_NOT_STORED}}. Currently we just return this error to the memcached client however, this brakes the behaviour of this interface that existed before the refactoring of our arithmetic operations (see v4.5.0). Thus, we should resolve this race condition by trying to re-perform the arithmetic operation by resetting the {{ArithmeticCommandContext}} state machine.
|
[Cloned this from There is a race condition in {{ArithmeticCommandContext}} where a {{SET}} operation is performed between the {{ArithmeticCommandContext::getItem()}} and {{ArithmeticCommandContext::storeNewItem()}}, causing the call to {{bucket_store()}} to return {{ENGINE_NOT_STORED}}. Currently we just return this error to the memcached client however, this brakes the behaviour of this interface that existed before the refactoring of our arithmetic operations (see v4.5.0). Thus, we should resolve this race condition by trying to re-perform the arithmetic operation by resetting the {{ArithmeticCommandContext}} state machine. |
Affects Version/s | 6.0.1 [ 15522 ] | |
Affects Version/s | master [ 13407 ] |
Fix Version/s | 6.0.2 [ 15919 ] | |
Fix Version/s | Mad-Hatter [ 15037 ] |
Link | This issue blocks MB-32630 [ MB-32630 ] |
Link | This issue relates to CBSE-6638 [ CBSE-6638 ] |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Actual End | 2019-04-18 10:17 (issue has been resolved) |
VERIFICATION STEPS | Closing based on unit test attached with the defect. | |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Build couchbase-server-6.0.2-2365 contains kv_engine commit f4395e1 with commit message:
MB-33854: Merge remote-tracking branch 'couchbase/vulcan' into alice