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

Investigate: Use a deque instead of a list for checkpoint

    XMLWordPrintable

Details

    Description

      We want to investigate the use of an std::deque for the following reasons:

      Reduces memory overhead. Since each element in a list has a forward and backward pointer.
      Simplifies the cursor offset code, by allowing us to use a simple index.

      There disadvantage of using a deque is that instead removing duplicate items we nullify them.

      • Nullify - for dealing with duplicate entries in a deque data structure. We want to essentially remove the item from the deque, but as a delete is expensive (because it requires us to shift all items) we instead set the entry to null.

      For workloads with high levels of duplication there is a potentially a relatively high overhead for skipping over the nullified items.

      Attachments

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

        Activity

          People

            owend Daniel Owen
            owend Daniel Owen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty