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

magma: Add stats for key and seq iterator runtime

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 7.6.0
    • None
    • storage-engine

    Description

      When bySeqno scan is performed, due various reasons like OOM, the magma seq iterator is restarted several times. This can impact the total effective time running the iterator. We need to accurately track the time spend in actually running the iterator vs paused time. This will be useful in debugging production issues. We also need to account for total items emited during this period so that we can derive actual items/sec throughput for the iterators.

      One of the common pattern in bySeqno scan is that we stop the iterator at some point and restart it later with last seqno key.
      If there are a lot of delete deltas, it is possible that iterator.Seek() may internally have to read and discard several items before the first valid visible item is returned. If we restart several times and if it coincides with a range where there are several deltas, delta discard needed to be performed several times. We need a stat to record the number of items discarded with each iterator session.

      We should implement the following stats as part of this ticket:
      1. Actual runtime of the iterator / a counter at magma db level
      2. Total number of deltas discarded
      3. Number of deltas discarded for the first Seek call

      Attachments

        Issue Links

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

          Activity

            People

              scott.lashley Scott Lashley
              sarath Sarath Lakshman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty