-
Type: Bug
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
ALL
-
v8.0
Came out of the QI feature flag audit. The feature flag is checked in mongot_cursor::establishCursorsForSearchStage(). This function can be called more than once per query, which would result in a feature flag check more than once per thread.
We aren't supposed to check feature flags more than once per thread because the first feature flag check could return one result while a subsequent check returns a diff result (like if setFCV was interleaved between the two checks).
For example, we could have an outer pipeline with $search as the first stage and another $search within a subpipeline (e.g. unionWith/lookup). This would result in the search stages establishing two independent cursors on the mongot → establishCursorsForSearchStage() being executed twice for this query → possible feature flag divergence between the two cursors with a setFCV race.
- split from
-
SERVER-91217 Query Integration: Audit feature flag checks for unsafe races with setFCV
- Closed