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

Warmup at ValueEviction wastes resources on create/warmup/eject value

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 7.6.4
    • Morpheus, 6.6.6, 7.0.5, 7.1.6, 7.2.5, 7.6.2
    • couchbase-bucket
    • None

    Description

      Note: By code inspection we appear to scan items by KEY_ONLY, so the ejection step is just not needed.

      MutationStatus HashTable::insertFromWarmup(const Item& itm,
                                                 bool eject,
                                                 bool keyMetaDataOnly,
                                                 EvictionPolicy evictionPolicy) {
          auto htRes = findInner(itm.getKey());
          auto* v = (itm.isCommitted() ? htRes.committedSV : htRes.pendingSV);
          auto& hbl = htRes.lock;
       
          if (v == NULL) {
              v = unlocked_addNewStoredValue(hbl, itm);
              v->markClean();
       
              // TODO: Would be faster if we just skipped creating the value in the
              // first place instead of adding it to the Item and then discarding it
              // in markNotResident.
              if (keyMetaDataOnly) {
                  const auto preProps = valueStats.prologue(v);
                  v->markNotResident();
                  valueStats.epilogue(preProps, v);
              }
          } 
      ..
      }
      

      Attachments

        Activity

          People

            paolo.cocchi Paolo Cocchi
            paolo.cocchi Paolo Cocchi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              PagerDuty