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
[Subtask]: D03 [baseline] Make SQL task async/run completion consistent and resumable after partial failure #32281
Catalog ID: D03 Origin: B - Pre-existing in the 4.2 baseline and retained on main Evidence level: Reproduced behavioral defect
4.2 versus main: provenance
In both 4.2 and main, Complete independently commits async Completed before repairing sql_task_run. If the second step fails, retry is rejected by the first step's Running compare-and-swap predicate.
Design problem, impact, and existing responsibility
The outer task is completed while the inner run remains RUNNING. The runner treats InvalidTask as terminal and removes the task, leaving subsequent executions blocked by overlap. With no task timeout, recovery may wait until StartedAt + 24h; with a configured timeout, it uses timeout + 1min grace. Two lifecycle records lack a complete consistency/retry owner.
Acceptance criteria
Inject one run query/update error after async Completed; once storage recovers, retry completes the correct run and subsequent execution is admitted.
Cover uncertain commit acknowledgements, repeated completion, stale epochs/runners, and execution identity. Metadata repair does not repeat business side effects.
Keep task GC, timeout, and normal completion responsibilities coherent, including termination during shutdown.
Describe implementation you've considered
Reuse the existing TaskStorage transaction or idempotent-completion boundary so a retry can finish the remaining transition. Design it together with D02's execution-identity constraints. Do not rerun already-committed business SQL merely to repair metadata.
Additional information
Existing investigation and validation limits
TestAuditSQLTaskCompletionRepairRetry uses real memory storage and injects only one QuerySQLTaskRun error: async=Completed, run=RUNNING, retry=InvalidTask, next Acquire=overlap. Calling the original repair directly as a diagnostic control succeeds, proving the dependency has recovered. Normal and 100 focused race repetitions confirm the result.
The named probes are local diagnostic overlays, not committed repository tests. Their names identify the investigation; they cannot be selected directly from an ordinary checkout. Implement the smallest maintained contract regressions and reuse relevant CI/validation proportionally. Temporary evidence commits are not required.
changed the title [-][Subtask]: D03 [base] 统一 SQL task 的 async/run 终态边界,使中途失败可重入完成[/-][+][Subtask]: D03 [baseline] Make SQL task async/run completion consistent and resumable after partial failure[/+]on Nov 5, 2026
Activity
[-][Subtask]: D03 [base] 统一 SQL task 的 async/run 终态边界,使中途失败可重入完成[/-][+][Subtask]: D03 [baseline] Make SQL task async/run completion consistent and resumable after partial failure[/+]fix(task): preserve SQL task execution ownership (#32331)