-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
MatchStage will create a SimpleMemoryUsageTracker using createChunkedSimpleMemoryUsageTrackerForStage. No per-stage limit is configured so the default INT_MAX is used. The tracker is threaded down through MatchProcessor::process() --> matchesBSON() --> MatchExpressionEvaluator, where it is stored as a _tracker member variable. This avoids passing the tracker through every visit() override since only visit(const ExprMatchExpression*) uses it, because that is the only path that evaluates arbitrary expressions. The input document size is added to the tracker so that expression evaluation is accounted for in the context of the document being matched. Plain predicate matching does not allocate significant memory and requires no tracking. The flags gFeatureFlagExpressionMemoryTracking and gFeatureFlagMemoryTracking must be checked before passing the tracker.
- related to
-
SERVER-127349 Thread SimpleMemoryUsageTracker in SBE stages
-
- Open
-