Details
-
Bug
-
Resolution: Fixed
-
Major
-
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
-
Security Level: Public
-
Untriaged
-
Unknown
Description
Here's the scenario:
- Stream currently in backfill phase
- When backfill is received, 1 item added to readyQ
a. itemsReady of stream set to true (Producer notified) - Front end op comes in
a. item added to checkpoint queue
b. itemsReady not set to true, as it already is (Producer not
notified) - 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 - Backfill completes
- 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.