BugZero found this defect 51 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
3/29/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
In signalDrainComplete(), we call onDrainComplete() to make the oplog buffer exit drain mode. But this is called before checking canCompleteTransitionToPrimary(). It's possible that this check fails (e.g. when calling signalDrainComplete() with a stale term), and in this case applier should later call signalDrainComplete() for retry. Prior to this project this is fine because the batcher will be able to call setTermWhenExhausted for the next batch and then applier call signalDrainComplete() again. But with the changes in project, since the buffer may already exited drain mode, this check will prevent batcher to call setTermWhenExhausted and the node will not complete stepup.