Operational Defect Database

BugZero found this defect 51 days ago.

MongoDB | 2627058

Call onDrainComplete after checking the node can complete transition to primary

Last update date:

3/29/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

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.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

In Code Review

Learn More

Search:

...