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

tempDeleted items can use substantial proportion of bucket quota

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 7.1.4, 7.1.0, 7.1.1, 7.1.2, 7.1.3
    • couchbase-bucket
    • Untriaged
    • 0
    • Yes

    Description

      Due to a change in eviction behaviour in 7.1.0 ( https://review.couchbase.org/c/kv_engine/+/159487 ), we stopped removing tempDeleted values from the HashTable when the ExpiryPager ran.

      This was done with a good reason: Pre-change, we would bump up expired item stats, which would then be misleading because these temp items are not user documents. The idea was to only clean them up by the ItemPager, when we hit the high watermark.

      However, the unintended consequence is that we can get significant memory usage by tempDeleted items, which while benign (we can evict these), is misleading to the customer, who only sees that mem_used is growing. 

      The proposed solution is to revert the old behaviour, clean up those items in the ExpiryPager (which runs every 10 mins by default), but to do so inline, without queuing them in the expired items list and without incrementing the expired item stats.

      Note that technically, a frequently accessed tempDeleted item can have a higher value than a very cold valued item. In a sense, the old behaviour was closer to providing a globally optimal solution that reduces bg fetches. However, because memory usage by tempDeleted items is not directly observable, we'd like to avoid filling up the bucket quota with them.

      Attachments

        Issue Links

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

          Activity

            People

              vesko.karaganev Vesko Karaganev
              vesko.karaganev Vesko Karaganev
              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