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

DCP Producer could miss streaming items from certain streams

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.4
    • 3.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 4.0.0, 4.1.0
    • couchbase-bucket
    • Security Level: Public
    • Untriaged
    • Unknown

    Description

      Here's the scenario:

      1. Stream currently in backfill phase
      2. When backfill is received, 1 item added to readyQ
        a. itemsReady of stream set to true (Producer notified)
      3. Front end op comes in
        a. item added to checkpoint queue
        b. itemsReady not set to true, as it already is (Producer not
        notified)
      4. Producer calls stream::next()
        a. stream in backfillPhase(): 1 item popped from readyQ
        b. backfill task still running => no state transition to IN_MEMORY
        c. 1 op returned to producer, producer re-adds vbucket to ready list
      5. Backfill completes
      6. Producer calls stream::next()
        a. stream in backfillPhase(): no items in readyQ
        b. As backfill task has completed, state transitions to IN_MEMORY
        c. no items in readyQ => NULL returned
        d. As no op obtained, producer doesn't re-add vbucket to ready list

      => Front end item remains stuck in checkpoint queue, until more front end ops come in - which would notify the producer

      The proposed fix here is: In step 6b, when the producer sees the backfill task has completed, and the state for the stream transitions to IN_MEMORY, move checkpoint items into readyQ. This way the readyQ will not be empty, and the producer would re-add the vbucket back into the ready list.

      Attachments

        Issue Links

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

          Activity

            People

              abhinav Abhi Dangeti
              abhinav Abhi Dangeti
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty