Operational Defect Database

BugZero found this defect 74 days ago.

MongoDB | 2600372

AsioReactor doesn't drain all work

Last update date:

3/12/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

AsioReactor uses the asio::io_context::poll method in AsioReactor::drain to flush remaining work during shutdown. The poll method only acts on immediately ready handlers, which means that drain can return while handlers that aren't immediately ready remain in the queue. Change the drain method to use the asio::io_context::run method instead, so that all work is drained. Note that the AsioReactor::run method creates an asio::io_context::work object before invoking asio::io_context::run. The effect of the work object is to change the behavior of run so that it blocks even when the handler queue is empty. Without the object, run will return as soon as all outstanding handlers are resolved.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Open

Learn More

Search:

...