From 033d93cd68b95bd0cffd48f645e5bd55c35ec489 Mon Sep 17 00:00:00 2001 From: tamnd <1218621+tamnd@users.noreply.github.com> Date: Sat, 10 Oct 2026 06:02:59 +0700 Subject: [PATCH] job-gate: run a query again when its q-error document does not parse --- scripts/job-gate.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/job-gate.py b/scripts/job-gate.py index b48d5b4b..8f798d3b 100644 --- a/scripts/job-gate.py +++ b/scripts/job-gate.py @@ -331,6 +331,18 @@ def joins(kind): def graded(engine, config, d, sql, threads): + """What `graded_once` finds, asked up to three times. A document cut short does not parse, and + on a shared machine with a nearly full disk that happens to a run now and then, so the query is + run again rather than ending every query after it. `None` if no run left one that parses.""" + for _ in range(3): + try: + return graded_once(engine, config, d, sql, threads) + except ValueError: + continue + return None + + +def graded_once(engine, config, d, sql, threads): """(kind, estimated, produced, top) for every operator one engine had an estimate for, where top says it is a join with no join above it.""" duck, rudb = databases(config, d)