Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-27223

SET is resetting nru to default

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.1.0
    • 5.0.0
    • couchbase-bucket
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jwalker Jim Walker
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty