-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Cluster Scalability
-
ALL
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The ReshardingChangeStreamsMonitor is responsible for consuming change events from the change stream to support resharding operations. During execution, the monitor blocks in cursor->more() inside _consumeChangeEvents.
For DBDirectClient, setUpOperationDeadline() skips setting the 1-second waitForInsertsDeadline when isInDirectClient() is true. Without this deadline, the awaitData wait blocks indefinitely: the cursor path through requestMore() / exhaustReceiveMore() carries no opCtx and has no interrupt check. This prevents the monitor from quiescing and causes cleanup to hang indefinitely.
Setting a deadline would resolve this issue. AwaitData operations go through CappedInsertNotifier::waitUntil, which uses opCtx->waitForConditionOrInterruptUntil(..., deadline, ...). The deadline ensures that the thread wakes up either when the time limit is reached or upon an interrupt, allowing it to process the kill signal and exit cleanly.
More details here.