Skip to content

fix: clear task identifier cache when the lookup fails - #656

Open
agustin18 wants to merge 1 commit into
graphile:mainfrom
agustin18:fix/task-identifier-cache-rejection
Open

agustin18 wants to merge 1 commit into
graphile:mainfrom
agustin18:fix/task-identifier-cache-rejection

Conversation

@agustin18

Copy link
Copy Markdown

Fixes #638

If the task identifier lookup fails once (for example 57P01 on admin shutdown, a dropped connection, or a pool checkout timeout), the rejected promise stays in the cache. Every later poll reuses it, so jobs never run again and the runner promise never settles.

The cache now clears when the lookup rejects, as long as a newer lookup has not replaced it. The next poll retries; later polls reuse the successful result.

Tests:

  • __tests__/taskIdentifiers.test.ts covers the retry after a rejection and the guard that preserves a newer lookup.
  • Both tests run without a database.

This branch has not been deployed

No deployments
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.

Task identifier cache keeps a rejected lookup forever, wedging the runner after a connection drop

1 participant