You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P2Scheduled: real but not urgentarea:queryQuery execution, planning, fast paths, overlay, result formattingperformancePerformance improvement (release notes: Performance)
Query memory accounting charges bindings at a flat BINDING_EST_BYTES (size_of::<Binding>(), fluree-db-query/src/context.rs) and groups at GROUP_EST_BYTES. Neither counts heap owned behind a binding — long string literals, NumBig values, maps/lists, GROUP_CONCAT/collect accumulators — so a query whose bindings carry large values is accounted well below its real footprint, and the per-query memory limit can be exceeded in practice without MemoryBudgetExceeded firing.
Every charging site inherits this: subquery.rs (retained batches, materialization, output windows), hash_join.rs, group_aggregate.rs, and the R2RML operators.
Raised in review of #1828 (#1828 (comment)), which is explicitly out of scope there.
Open questions:
Whether to measure heap per binding at charge time (cost on the hot path) or sample/approximate by value kind.
Whether this should land with the shared concurrency memory-admission work, which relies on the same counter.
One more site for this, found while looking at referencing-object-map joins over an Iceberg graph source: R2rmlScanOperator collects the whole parent table (fluree-db-query/src/r2rml/operator.rs:1322, collect_stream) before build_parent_lookup starts charging the budget (:2806-2820, ~200 B per entry). The raw column batches are never counted, and the per-file buffers are excluded on purpose (:253-255, :1524). So a join over a multi-million-row parent can pass the budget while holding both the raw parent and its lookup. We saw peaks right at a 10 GB container's limit on a ~9M-row parent. #2239 (pushing the child keys into the parent scan) would be the structural fix; counting the collected batches would be the cheap guard in the meantime.
P2Scheduled: real but not urgentarea:queryQuery execution, planning, fast paths, overlay, result formattingperformancePerformance improvement (release notes: Performance)
Activity
aaj3f commentedon Nov 2, 2026
One more site for this, found while looking at referencing-object-map joins over an Iceberg graph source:
R2rmlScanOperatorcollects the whole parent table (fluree-db-query/src/r2rml/operator.rs:1322,collect_stream) beforebuild_parent_lookupstarts charging the budget (:2806-2820, ~200 B per entry). The raw column batches are never counted, and the per-file buffers are excluded on purpose (:253-255,:1524). So a join over a multi-million-row parent can pass the budget while holding both the raw parent and its lookup. We saw peaks right at a 10 GB container's limit on a ~9M-row parent. #2239 (pushing the child keys into the parent scan) would be the structural fix; counting the collected batches would be the cheap guard in the meantime.