-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
DB Integration & Observability
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Follow-up to SERVER-129849.
The idle-mongot-cursor disposal marker is set in run_aggregate.cpp from LiteParsedPipeline::hasMongotStage(), which only inspects top-level stages.
Gap: LiteParsedLookup/LiteParsedUnionWith forward only the extension-stage checks, so a built-in $search/$vectorSearch nested in a sub-pipeline is not detected. A $unionWith whose sub-pipeline contains $search builds that sub-pipeline eagerly and retains the mongot task executor; if the outer cursor is registered with batchSize: 0, OpDebug::mongotCursorId is never set either, so the cursor is not disposed at shutdown and shutdown waits out the searchTaskExecutorShutdownTimeoutMS backstop (default 60s). $lookup builds its sub-pipeline lazily, so it is a narrower case.
Fix direction: make mongot-stage detection recurse through sub-pipelines (single source of truth), consider renaming the marker to mayHoldMongotTaskExecutor to reflect that ownership is inferred rather than ground truth, and add regression tests for a nested $search/$vectorSearch under $unionWith (and $lookup if reachable) with batchSize: 0.
- related to
-
SERVER-129849 Fix mongod shutdown hang waiting for search task executor
-
- Closed
-