fix: index the running/leased_until arm of the job-lease query

The lease predicate's `state='running' AND leased_until < now()` arm had no
index, so every lease poll seq-scanned the whole crawler_jobs table (audit H2).
migration 0039 adds a partial index on (leased_until) WHERE state='running'.
Behavior-neutral; 29 lease tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-07-13 21:43:33 +02:00
parent 042e7e9047
commit cb757e7b69
4 changed files with 21 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "mangalord"
version = "0.128.18"
version = "0.128.19"
edition = "2021"
default-run = "mangalord"