fix: recover expired Redis task reservations - #280
Merged
suguanYang merged 3 commits intoAug 14, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Staging showed that hard-killed gevent work could remain in Redis's unacked set after the 4,500-second visibility window. An approved one-time call through a fresh Kombu channel restored the stranded reservations and allowed redelivery.
The original implementation scheduled that operation through Celery Beat. Review found two distributed-runtime gaps:
The watchdog remains outside the Celery execution pool and introduces no new AWS service or broker queue. Mixed old/new EKS and Fargate workers can therefore share the broker without unknown-task routing or RedBeat schedule conflicts.
Runtime behavior
attemptedrather than claiming that Kombu restored a specific count or acquired its internal mutex.Evidence
Job already charged.Verification
git diff --check: passedRemaining live gates
This code does not by itself complete issue Ontos-AI/knowhere-api-infra#22. Staging still needs the deployed hard-stop/redelivery drill, duplicate-side-effect checks, mixed-replica and application-Redis-outage drills, watchdog kill/hang restart timing, backlog recovery above 1,000 reservations, and the ECS 120-second shutdown check.
This PR is review-only. Do not merge, promote to
staging, deploy, or rerun the staging test job without explicit approval.