Skip to content

fix: redisWorker lock leaks across acquire, abort, cancel, and dispatch - #7945

Open
carlosthe19916 wants to merge 1 commit into
pulp:mainfrom
carlosthe19916:fix/7902-redis-lock-leaks
Open

fix: redisWorker lock leaks across acquire, abort, cancel, and dispatch#7945
carlosthe19916 wants to merge 1 commit into
pulp:mainfrom
carlosthe19916:fix/7902-redis-lock-leaks

Conversation

@carlosthe19916

Copy link
Copy Markdown
Contributor

closes #7902

Summary

Redis task/resource locks have no TTL. Several RedisWorker/dispatch paths could acquire them and never release, permanently blocking work.

Solution

Release locks on every leak path: fetch_task failures after acquire, supervise_task abort (finally), all claimed tasks in handle_tasks, WAITING cancel_task (owner from the task lock key), and retried release on transient Redis errors in immediate dispatch/adispatch.

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

@carlosthe19916 carlosthe19916 changed the title Fix RedisWorker lock leaks across acquire, abort, cancel, and dispatch fix: redisWorker lock leaks across acquire, abort, cancel, and dispatch Aug 5, 2026
Signed-off-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com>
@carlosthe19916
carlosthe19916 force-pushed the fix/7902-redis-lock-leaks branch from 824731f to db061f5 Compare August 5, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RedisWorker leaks Redis locks in multiple code paths

1 participant