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

Change ep-engine full eviction item counts to not overcount

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 5.0.0
    • couchbase-bucket
    • None

    Description

      The current behaviour of ep-engine under full eviction is to assume that any mutation to a non-resident key is an Insert - i.e. the creation of a new item - and hence will increase the bucket item count. If this assumption is found to be false when the persistence callback completes, then a correction factor is applied (we decrement 1 from curr_items).

      The net effect is the item count is correct eventually (when mutations quiesce), but it can over-count while there are mutations outstanding.

      This is problematic as it could mislead users - for example if they see their bucket has 1001 items in it when they know they only have 1000 documents.

      Instead we should do the opposite - assume a mutation to a non-resident key is an update - and don't increment the count until the persistence callback can confirm that the mutation was an insert. The result of this is we may under-count before we quiesce; but that is (a) consistent with the rest of ep-engine and (b) less surprising to a user as we haven't made up an extra item.

      Attachments

        Issue Links

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

          Activity

            People

              drigby Dave Rigby (Inactive)
              drigby Dave Rigby (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty