Skip to content

Fix/redis flushall issue#13

Merged
Morry98 merged 5 commits into
mainfrom
fix/redis-flushall-issue
May 14, 2026
Merged

Fix/redis flushall issue#13
Morry98 merged 5 commits into
mainfrom
fix/redis-flushall-issue

Conversation

@Morry98
Copy link
Copy Markdown
Owner

@Morry98 Morry98 commented May 13, 2026

  • 🐛 Consumer group loss after FLUSHALL: FLUSHALL at runtime deletes all stream consumer groups. The Coordinator recreates streams via XADD, but xreadgroup kept throwing NOGROUP on every iteration. Catch NOGROUP in _try_read_stream and call setup_consumer_groups() to recover; the Reconciler republishes any tasks queued before the group was restored.

  • 🐛 False "Task failed" after flush: When a task finishes while the consumer group is gone, xack throws NOGROUP. The generic handler in _execute_and_ack was catching this, logging "Task failed", and applying backoff on a task that actually succeeded. Catch NOGROUP in _ack_message and log a warning instead — the message is already gone from the PEL.

Morry98 and others added 4 commits May 13, 2026 17:34
When Redis is flushed at runtime, stream consumer groups are deleted.
xreadgroup then throws NOGROUP on every iteration, causing the consumer
loop to spin indefinitely without processing any tasks.

Catch NOGROUP in _try_read_stream and call setup_consumer_groups() to
recreate the groups immediately. The Reconciler then republishes any
tasks that were enqueued before the groups were restored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
If a task completes mid-execution while the consumer group has been
deleted (e.g. Redis FLUSHALL), xack throws NOGROUP. This caused the
success-path exception handler to log a false "Task failed", apply
incorrect backoff, and surface an unhandled asyncio exception.

After a flush the message is already gone from the PEL, so there is
nothing to acknowledge. Catch NOGROUP in _ack_message and log a warning
instead of propagating the error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Morry98 Morry98 merged commit 854a604 into main May 14, 2026
10 of 15 checks passed
@Morry98 Morry98 deleted the fix/redis-flushall-issue branch May 14, 2026 09:32
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