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

[SR] Active should not load Committed prepares into the ADM at warmup

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Critical
    • 6.5.0
    • 6.5.0
    • couchbase-bucket
    • None
    • Triaged
    • No
    • KV-Engine Mad-Hatter GA

    Description

      The ADM should not be tracking Committed prepares after warmup.

      But that happens at EPBucket::loadPreparedSyncWrites:

       EPBucket::LoadPreparedSyncWritesResult EPBucket::loadPreparedSyncWrites(
      1471          folly::SharedMutex::WriteHolder& vbStateLh, VBucket& vb) {
      1472      /// Disk load callback for scan.
      1473      struct LoadSyncWrites : public StatusCallback<GetValue> {
      1474          LoadSyncWrites(EPVBucket& vb, uint64_t highPreparedSeqno)
      1475              : vb(vb), highPreparedSeqno(highPreparedSeqno) {
      1476          }
      1477  
      1478          void callback(GetValue& val) override {
      ..
      1492              if (val.item->isPending()) {
      1493                  // Pending item which was not aborted (deleted). Add to
      1494                  // outstanding Prepare map.
      1495                  outstandingPrepares.emplace(val.item->getKey(),
      1496                                              std::move(val.item));
      1497                  return;
      1498              }
      1499  
      1500              if (val.item->isCommitted()) {
      1501                  // Committed item. _If_ there's an outstanding prepared
      1502                  // SyncWrite, remove it (as it has already been committed).
      1503                  outstandingPrepares.erase(val.item->getKey());
      1504                  return;
      1505              }
      1506          }
      ..
      

       

      Note:

      • line 1495: we add the Prepare to the outstandingPrepares map
      • line 1503: we try to remove the Prepare from the map, but Prepare and Commit keys are in different namespaces, so actually we do not remove anything

      Attachments

        Issue Links

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

          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:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty