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

Warmup: Delete of VBucket whilst paused skips next vbucket

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.2.6, 7.6.4
    • 7.6.0, 6.6.6, 7.0.0-Beta1, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.4, 7.0.5, 7.1.0, 7.1.1, 7.1.2, 7.2.0, 7.1.3, 7.2.1, 7.1.5, 7.2.4, 7.2.2, 7.1.6, 7.2.3, 7.2.5, 7.6.1
    • couchbase-bucket
    • Untriaged
    • 0
    • Unknown

    Description

      Various phases of Warmup are driven by the class WarmupVbucketVisitor this class owns a ScanContext and supports the pause/resume pattern. Pause occurs when the scanning of a vbucket hits a time threshold, e.g. 100ms.

      The problem is that the ScanContext is owned by the WarmupVBucketVisitor and the management of which vbucket (file) that object refers to is done by the WarmupVBucketVisitor, e.g. once the scan reaches the end of the file or an error occurs (reset the context).

      The bug here is what happens when a VBucket is deleted (set dead etc...) whilst paused, essentially the pause/resume loop which is owned by KVBucket will try to resume warmup of a vbucket, which was deleted. The next vbucket is instead selected and we call back into WarmupVBucketVisitor::visit, yet the scan context is still pointing to the previous vbucket.

      E.g. assume vb:1 and vb:2 exist and warmup begins a WarmupVbucketVisitor phase, we start at vb:1

      1. KVBucket::pauseResume starts with vb:1
      2. Call WarmupVbucketVisitor::visit for vb:1
      3. scanContext = initScanContext(vb:1)
      4. scan(scanContext)
      5. 100ms time-up, pause
      6. setDead(vb:1)
      7. KVBucket::pauseResume tries to continue with vb:1. vb:1 dead, move to vb:2
      8. Call WarmupVbucketVisitor::visit for vb:2
      9. scan(scanContext) !!! scanContext is from vb:1
      10. The code in LoadStorageKVPairCallback::callback gets called back for all items in vb:1, yet it too fails to find the vb:1 object and no data is loaded
      11. scan reaches end and returns success
      12. Warmup thinks vb:2 was scanned....

      Attachments

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

        Activity

          People

            ashwin.govindarajulu Ashwin Govindarajulu
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty