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
{{ message }}
Repository navigation
[P0][bug] EXPLAIN ANALYZE has no timeout — runs the actual query, can hang indefinitely on production #420
EXPLAIN ANALYZE runs the actual query to gather timing/cost data.
Problem
src/stores/resultStore.ts:118-136 (executeExplainAnalyze) has no timeout. EXPLAIN ANALYZE executes the query. executeQuery honors query_timeout_secs per editor F3 — but the column is never enforced in the executor. So EXPLAIN ANALYZE on a 10-minute query hangs for 10 minutes with no cancel. The QueryToolbar Cancel button (cancelActiveQuery) bumps a JS counter but doesn't actually cancel — see editor F1.
Files
src/stores/resultStore.ts:118-136
Repro
Open query tab, type SELECT SLEEP(120)
Click Explain → EXPLAIN ANALYZE
UI hangs for 2 minutes, no cancel button on the EXPLAIN panel, no timeout
Expected
EXPLAIN ANALYZE on SELECT SLEEP(120) returns an error within 60s.
Proposed fix
Until editor F1 lands (real cancel) and editor F3 lands (timeout enforcement), hardcode a 60-second timeout in executeExplainAnalyze and surface "EXPLAIN ANALYZE timed out after 60s" error. Once those land, wire up real cancel + timeout. Scope: L (depends on editor F3 + F1).
Acceptance
EXPLAIN ANALYZE on SELECT SLEEP(120) returns an error within 60s.
Activity
fix(explain): stop EXPLAIN ANALYZE running writes, and make timeouts …