Skip to content

Drop deleted engines from worker rotation instead of failing the batch#59

Merged
jgpruitt merged 1 commit intomainfrom
me0/missing-engine-fix
Apr 28, 2026
Merged

Drop deleted engines from worker rotation instead of failing the batch#59
jgpruitt merged 1 commit intomainfrom
me0/missing-engine-fix

Conversation

@jgpruitt
Copy link
Copy Markdown
Collaborator

When an engine was deleted between discover() refreshes, processBatch threw "schema does not exist" which bubbled to the worker's generic error handler — reporting a top-level exception, starving sibling engines later in the rotation, and forcing exponential backoff for up to ~60s until the next refresh removed the dead schema.

Now the per-target loop catches SQLSTATE 3F000 (invalid_schema_name), logs a warning, drops the target from the in-memory list, and continues to the next engine. Same handling on pruneQueue covers the claim/prune race.

When an engine was deleted between discover() refreshes, processBatch
threw "schema does not exist" which bubbled to the worker's generic
error handler — reporting a top-level exception, starving sibling
engines later in the rotation, and forcing exponential backoff for up
to ~60s until the next refresh removed the dead schema.

Now the per-target loop catches SQLSTATE 3F000 (invalid_schema_name),
logs a warning, drops the target from the in-memory list, and continues
to the next engine. Same handling on pruneQueue covers the claim/prune
race.
@jgpruitt jgpruitt merged commit d8afb7b into main Apr 28, 2026
3 checks passed
@jgpruitt jgpruitt deleted the me0/missing-engine-fix branch April 28, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant