-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2024-03-18, QE 2024-04-01
-
144
Normally, locks are held when acquiring a CollectionPtr, but these are dropped when yielding:
/** * Smart-pointer'esque type to handle yielding of Collection lock that may invalidate pointers when * resuming. CollectionPtr will re-load the Collection from the Catalog when restoring from a yield * that dropped locks. */
Cached plans require a trial period of executing the plan, which could imply yielding. These yields then cause the locks to be released, and could allow for a dropIndex command to be interleaved.
Normally when this happens, the query should killed with a QueryPlanKilled exception:
auto desc = collectionPtr()->getIndexCatalog()->findIndexByIdent(expCtx()->opCtx, _indexIdent);
uassert(ErrorCodes::QueryPlanKilled,
str::stream() << "query plan killed :: index '" << _indexName << "' dropped",
desc);
This is fixes the scenarios discovered in BF-32193 and BF-32233.
- is related to
-
SERVER-88622 Replace classic stage builder index invariants with tassert; Add tests for parsing 'NumberLongs' as arguments to bitwise expressions
- Closed
- related to
-
SERVER-86174 Avoid unnecessary fillOutPlannerParams() and fillOutSecondaryCollectionsInformation() calls
- Closed