8000 streaming engine 7/9: memory accounting and optional cap (QRY-012) (#473) · Issue #549 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

streaming engine 7/9: memory accounting and optional cap (QRY-012) (#473) #549

Closed

Description

@adityamukho

Part 7 of 9 of #473. Design: docs/superpowers/specs/2026-10-11-streaming-engine-design.md (branch docs/473-streaming-engine-spec), §7.

  • Byte accounting in every stateful operator; growth through try_reserve
  • OpenOptions::query_memory_limit, off by default (usize::MAX)
  • QRY-012 query memory limit exceeded, naming the operator and the limit; docs/ERROR_REFERENCE.md
  • Bindings: the option on every OpenOptions record (UniFFI maps usize::MAX to i64::MAX) and the new code
  • Acceptance: grouped count with 1M groups completes; with the cap set below that, fails with QRY-012
  • Acceptance (Nightly fuzz failure (main) #575): a join of k patterns with no shared variables and a small :find projection (e.g. k = 13 over 3 facts, 1.6M intermediate rows) drained through a cursor (Minigraf::query; :find returns a bag, so execute holds every row by design) runs in memory bounded by the hash-join build sides, not by the row count (today it peaks >5.7 GB); with query_memory_limit set below that, it fails with QRY-012 instead of aborting. Requires the build-side choice to use the product estimate for cartesian joins

PRs for this part target v3 and must not use a closing keyword for #473.

Activity

  1. added this to the v3.0.0 milestone on Oct 11, 2026
  2. added
    enhancementNew feature or request
    rustPull requests that update rust code
    stabilityStability/panic issue
    on Oct 11, 2026
  3. adityamukho commented on Oct 21, 2026

    @adityamukho
    CollaboratorAuthor

    Spec: PR #674 (docs/superpowers/specs/2026-10-21-query-memory-limit-design.md). Acceptance text corrected: :find is a bag, so the #575 test drains a cursor; there is no distinct set.

  4. added 5 commits that reference this issue on Oct 21, 2026
  5. adityamukho commented on Oct 21, 2026

    @adityamukho
    CollaboratorAuthor

    Done on v3: PR 1 #676 (meter, accounting, QRY-012, OpenOptions::query_memory_limit, keyless build side) and PR 2 #681 (acceptance tests at 1M groups and the #575 product, smoke.yml job, measured figures in docs/BENCHMARKS.md). Binding PRs for the option and QRY-012 follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrustPull requests that update rust codestabilityStability/panic issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0