Description
Append operations are no longer tracked under the cmd_set statistic.
This used to work in the 4.6.x line of releases and looking at the code it looks like the intent is that it should still be tracked https://github.com/couchbase/kv_engine/blob/b999dd38ecf0c8d579f34f438b84f2469da51396/daemon/protocol/mcbp/appendprepend_context.cc#L67.
Think the behavior changed in https://github.com/couchbase/kv_engine/commit/dd9518762e9eab71a6080795ae2db3fb27a468a2#diff-86ca1008bc12a7020be8146e4a8ec076.
Looking at the code:
auto ret = ENGINE_SUCCESS;
|
do { |
switch (state) { |
case State::ValidateInput: |
ret = validateInput();
|
break; |
case State::InflateInputData: |
ret = inflateInputData();
|
break; |
case State::GetItem: |
ret = getItem();
|
break; |
case State::AllocateNewItem: |
ret = allocateNewItem();
|
break; |
case State::StoreItem: |
ret = storeItem();
|
break; |
case State::Reset: |
ret = reset();
|
break; |
case State::Done: |
return ENGINE_SUCCESS; |
}
|
} while (ret == ENGINE_SUCCESS); |
|
if (ret != ENGINE_EWOULDBLOCK) { |
SLAB_INCR(&connection, cmd_set);
|
}
|
I'm not sure the if statement after the state machine makes sense, since under normal circumstances the code will never reach the stat incrementing statement since when it's finished, it will return.
Instead the stat increment should be within the State::Done step.