-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
ProjectStage, FilterStage and LoopJoinStage evaluate expressions in SBE. All will create a SimpleMemoryUsageTracker using createChunkedSimpleMemoryUsageTrackerForSBE and pass it to ByteCode via the setTracker() method (SERVER-127228) in prepare(). This enables VM stack-level tracking and built-in function instrumentation during expression evaluation.
ProjectStage additionally needs to track the cumulative memory of the values returned by expressions. This is done automatically by the ByteCode since it does not decrease the memory usage for the result.
All stages should track the memory used by their input and, since they are all streaming, they should reset their memory usage before returning their output.
The stages should check both flags gFeatureFlagQueryMemoryTracking and gFeatureFlagExpressionMemoryTracking and set the tracker only when both are set.
- is related to
-
SERVER-128061 Set SimpleMemoryUsageTracker in Bytecode and use it to track stack memory usage
-
- Backlog
-
-
SERVER-129692 Use SimpleMemoryUsageTracker to track stack memory usage
-
- Backlog
-
-
SERVER-127228 Create internalQueryMaxMemoryUsageBytesPerOperation and use when verifying then memory is within limit in SimpleMemoryUsageTracker
-
- Closed
-
-
SERVER-127781 Thread SimpleMemoryUsageTracker through MatchStage
-
- Closed
-
-
SERVER-128077 Thread SimpleMemoryUsageTracker through RedactStage
-
- Closed
-