ERR
redis
data_error
ai_generated
partial
ERR PEL corruption detected for consumer group 'mygroup' on stream 'mystream'
ID: redis/stream-consumer-group-pel-corruption
78%Fix Rate
82%Confidence
1Evidence
2024-02-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 6.2.6 | active | — | — | — |
| 7.0.8 | active | — | — | — |
| 7.2.4 | active | — | — | — |
Root Cause
The Pending Entries List (PEL) for a consumer group has become corrupted, typically due to an abnormal shutdown or a bug in stream implementation leading to inconsistent internal state.
generic中文
消费者组的待处理条目列表(PEL)已损坏,通常是由于异常关闭或流实现中的错误导致内部状态不一致。
Official Documentation
https://redis.io/commands/xgroup-setid/Workarounds
-
80% success Use `XGROUP SETID mystream mygroup 0-0` to reset the last delivered ID to the beginning, then manually acknowledge all pending entries with `XACK mystream mygroup <id1> <id2> ...` to clear the PEL.
Use `XGROUP SETID mystream mygroup 0-0` to reset the last delivered ID to the beginning, then manually acknowledge all pending entries with `XACK mystream mygroup <id1> <id2> ...` to clear the PEL.
-
75% success If the stream is not critical, dump the stream to a backup using `XREAD COUNT 10000 STREAMS mystream 0`, then delete and recreate the stream and consumer group, and replay the messages.
If the stream is not critical, dump the stream to a backup using `XREAD COUNT 10000 STREAMS mystream 0`, then delete and recreate the stream and consumer group, and replay the messages.
中文步骤
使用 `XGROUP SETID mystream mygroup 0-0` 将最后交付的ID重置为开头,然后使用 `XACK mystream mygroup <id1> <id2> ...` 手动确认所有待处理条目以清除PEL。
如果流不重要,使用 `XREAD COUNT 10000 STREAMS mystream 0` 将流备份,然后删除并重新创建流和消费者组,并重放消息。
Dead Ends
Common approaches that don't work:
-
70% fail
Deleting and recreating the consumer group loses all pending messages and consumer progress, which may cause data loss for unprocessed entries.
-
90% fail
Restarting the Redis server does not repair PEL corruption; the corruption persists in the RDB or AOF file.