8000 bug: a rule query fails with INT-020 on any database with 1,000,000 or more live facts · Issue #528 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

bug: a rule query fails with INT-020 on any database with 1,000,000 or more live facts #528

Closed

Description

@adityamukho

RecursiveEvaluator::evaluate (src/query/datalog/evaluator.rs) seeds seen_facts with every base fact, then returns INT-020 "Max query results (1000000) exceeded" when seen_facts.len() >= max_results on the first new derived fact. The limit counts the database, not the answer. On the #394 envelope fixture at 1M facts, [:find ?b :where (boss :p166665 ?b)] (an ancestor walk of 6 rows; boss is the transitive closure of :manager) fails with INT-020. Every rule query does the same once the database has max_results live facts. The same code is on main (v2.x).

Fix: count only derived facts against max_results, or compare against the answer size. Add a test that runs a rule query on a database with more base facts than a small max_results and gets its answer.

Found by the #394 performance envelope (examples/perf_envelope.rs, results in docs/BENCHMARKS.md on v3).

Activity

  1. added this to the v3.0.0 milestone on Oct 11, 2026
  2. added
    bugSomething isn't working
    known-issueBug present in a published release and not yet fixed in one; listed in the pinned known-issues issue
    on Oct 11, 2026
  3. adityamukho commented on Oct 11, 2026

    @adityamukho
    CollaboratorAuthor

    Affects every release since v0.18.0 (8076c86, query limits). Workaround until the fix: raise the limit above the number of live facts plus the derived ones, with OpenOptions::max_results or :max-results in the query. Listed in #421.

  4. added a commit that references this issue on Oct 11, 2026
  5. adityamukho commented on Oct 11, 2026

    @adityamukho
    CollaboratorAuthor

    Fixed on v3 by #534 (2fea6a3); ships in v3.0.0. Not backported to v2.x (not a data-integrity fix) Backported to v2.x by #538 (0edfbe3, on main), not yet released: until v3.0.0 ships, 2.0.x gets all bug fixes under the support policy. Stays listed in #421 until a release with the fix is out.

  6. added 3 commits that reference this issue on Oct 11, 2026
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

    bugSomething isn't workingknown-issueBug present in a published release and not yet fixed in one; listed in the pinned known-issues issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0