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
Attachments
For Gerrit Dashboard: MB-27223 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
86826,4 | MB-27223: Don't reset NRU on an update | master | kv_engine | Status: ABANDONED | -1 | +1 |
86894,1 | MB-27223: Don't reset NRU on an update | master | kv_engine | Status: ABANDONED | 0 | 0 |
86895,2 | MB-27223: Don't reset NRU on an update | spock | kv_engine | Status: MERGED | +2 | +1 |
87040,1 | Merge remote-tracking branch 'couchbase/spock' into 'couchbase/master' | master | kv_engine | Status: MERGED | +2 | +1 |