A permanent database error while recording data-cube appends stalls all dispatching

Open
#262 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start with services/pipeline/src/pipeline/dispatcher/loop.py, especially the record_appends call after the catalog-change loop, and trace how the batch is marked done or released for retry. Check the existing dispatcher fakes and tests for how to simulate a permanent database permission error. Done means append-recording failure is logged and counted, the rest of the batch is marked done or released, and a test covers that behavior.

Written by the indexing model from the issue text.

Description

ready

Found by independent review of #253; the code is the same on main, so it predates that PR.

After the dispatcher has worked through a batch of catalog changes it records the data-cube appends in one step (services/pipeline/src/pipeline/dispatcher/loop.py, the record_appends call after the loop). If that step fails with a permanent database error (for example a missing table or missing permission), the error escapes: the batch is neither marked done nor released for retry. The batch is picked up again after 10 minutes and fails the same way, indefinitely. Deliveries and process runs for every collection in that batch never go out, and the retry cap never applies because the attempt count never increases.

Reproduced with the repo's own fakes: with the append-recording step raising a permission error, one event from a cube source and one from another collection gave no deliveries, nothing marked processed, nothing released.

Likelihood in supported deployments is low (the two cube tables are created together and the pipeline connects as the owner), but it is the one path where "a data-cube problem must not hold up deliveries" is false.

Done when: a failure recording cube appends cannot prevent the rest of the batch from being marked done or released, the failure is logged and counted, and a test covers it.

🤖 Generated with Claude Code

Dominant language
Python
Stars
0
Forks
2
Avg merge
8h 26m
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TechTraverse/stac-higher

All issues in TechTraverse/stac-higher

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.