# ERR PEL corruption detected for consumer group 'mygroup' on stream 'mystream'

- **ID:** `redis/stream-consumer-group-pel-corruption`
- **Domain:** redis
- **Category:** data_error
- **Error Code:** `ERR`
- **Verification:** ai_generated
- **Fix Rate:** 78%

## 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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 6.2.6 | active | — | — |
| 7.0.8 | active | — | — |
| 7.2.4 | active | — | — |

## Workarounds

1. **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.** (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.
   ```
2. **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.** (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.
   ```

## Dead Ends

- **** — Deleting and recreating the consumer group loses all pending messages and consumer progress, which may cause data loss for unprocessed entries. (70% fail)
- **** — Restarting the Redis server does not repair PEL corruption; the corruption persists in the RDB or AOF file. (90% fail)
