23,582 Thumbnail jobs are queued and nothing consumes them #73

Closed
opened 2026-09-26 14:43:22 +00:00 by dtourolle · 1 comment
Owner

The reference catalog has 23,582 Thumbnail jobs queued and nothing consumes that kind. The job queue in dr-catalog has no consumer for it at all, and the scan's persist adds another job per photograph on every scan.

Why

Found in the 2026-09-25 performance pass. v0.16.0 made the enqueue cheap (it moved inside the scan's transaction) but kept the behaviour. So the table grows with the library, and every query over jobs pays for rows nobody will read.

Deliverable

Decide whether a thumbnail job queue is the design (then wire a consumer) or a leftover (then stop enqueueing, and drop the queued rows in a migration). Record the decision in docs/dev/catalog.md.

Acceptance

  • No job kind is enqueued without a consumer (a test that lists kinds enqueued against kinds claimed)
  • The reference catalog's jobs table after one scan holds only jobs something will run
**The reference catalog has 23,582 `Thumbnail` jobs queued and nothing consumes that kind.** The job queue in `dr-catalog` has no consumer for it at all, and the scan's `persist` adds another job per photograph on every scan. ## Why Found in the 2026-09-25 performance pass. v0.16.0 made the enqueue cheap (it moved inside the scan's transaction) but kept the behaviour. So the table grows with the library, and every query over `jobs` pays for rows nobody will read. ## Deliverable Decide whether a thumbnail job queue is the design (then wire a consumer) or a leftover (then stop enqueueing, and drop the queued rows in a migration). Record the decision in docs/dev/catalog.md. ## Acceptance - [ ] No job kind is enqueued without a consumer (a test that lists kinds enqueued against kinds claimed) - [ ] The reference catalog's `jobs` table after one scan holds only jobs something will run
dtourolle added the catalogsize:Sperformance labels 2026-09-26 14:43:22 +00:00
Author
Owner

Done in 5da2858, 5fcd375, 6e67ef4, b3dbf4a and 441f6f1, released in v0.17.0. The Thumbnail job kind was a leftover: the runner deliberately registered no handler for it (846a249), because the grid worker and the sweep serve thumbnails from what the store lacks. Scans no longer enqueue it. Pending rows are dropped at runtime whenever a catalog is opened (23,582 rows, 1 MB, on the reference catalog), which tolerates older peers re-enqueueing them, with no schema bump. core/dr-catalog/tests/every_queued_kind_has_a_consumer.rs refuses any kind enqueued without a consumer. The decision is recorded in catalog.md §6.1.

Done in 5da2858, 5fcd375, 6e67ef4, b3dbf4a and 441f6f1, released in v0.17.0. The Thumbnail job kind was a leftover: the runner deliberately registered no handler for it (846a249), because the grid worker and the sweep serve thumbnails from what the store lacks. Scans no longer enqueue it. Pending rows are dropped at runtime whenever a catalog is opened (23,582 rows, 1 MB, on the reference catalog), which tolerates older peers re-enqueueing them, with no schema bump. `core/dr-catalog/tests/every_queued_kind_has_a_consumer.rs` refuses any kind enqueued without a consumer. The decision is recorded in catalog.md §6.1.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dtourolle/DarkRoom#73