Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.pinot.core.operator.blocks.ProjectionBlock;
import org.apache.pinot.core.query.request.context.QueryContext;
import org.apache.pinot.segment.spi.datasource.DataSource;
import org.apache.pinot.spi.query.QueryThreadContext;
import org.apache.pinot.spi.trace.Tracing;


Expand Down Expand Up @@ -91,6 +92,10 @@ protected ProjectionBlock getNextBlock() {
} else {
Tracing.activeRecording().setNumChildren(_dataSourceMap.size());
_dataBlockCache.initNewBlock(docIdSetBlock.getDocIds(), docIdSetBlock.getLength());
// Sample resource usage once per projected block so OOM accounting stays fresh across long scans. This is the
// shared projection path for scan-based operators (aggregation, group-by, distinct, selection). Termination is
// already checked per block by BaseOperator#nextBlock.
QueryThreadContext.sampleUsage();
return new ProjectionBlock(_dataSourceMap, _dataBlockCache);
}
}
Expand Down
Loading