Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.0.0
-
None
-
Triaged
-
Yes
Description
Code review so far (needs test to confirm)
Following the code for 5.0 vs 4.6.2 I see that if I was to do a set against a hot-key (nru of 0), the nru will be reset to the initial_nru (nru of 2).
The main issue is show in setValueImpl which has an unconditional setNru, copying the nru from Item (which is constructed as INITIAL_NRU_VALUE).
http://src.couchbase.org/source/xref/trunk/kv_engine/engines/ep/src/stored-value.cc#306
whereas 4.6.2 has a conditional setNru (on a frontend SET code path the nru variable has the value of 0xff).
http://src.couchbase.org/source/xref/4.6.2/ep-engine/src/stored-value.h#1100