{
  "id": "redis/stream-consumer-group-pel-corruption",
  "signature": "ERR PEL corruption detected for consumer group 'mygroup' on stream 'mystream'",
  "signature_zh": "错误：在流'mystream'上检测到消费者组'mygroup'的PEL损坏",
  "regex": "ERR PEL corruption detected for consumer group '.+' on stream '.+'",
  "domain": "redis",
  "category": "data_error",
  "subcategory": null,
  "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.",
  "root_cause_type": "generic",
  "root_cause_zh": "消费者组的待处理条目列表（PEL）已损坏，通常是由于异常关闭或流实现中的错误导致内部状态不一致。",
  "versions": [
    {
      "version": "6.2.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "7.0.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "7.2.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Deleting and recreating the consumer group loses all pending messages and consumer progress, which may cause data loss for unprocessed entries.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Restarting the Redis server does not repair PEL corruption; the corruption persists in the RDB or AOF file.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "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.",
      "success_rate": 0.8,
      "how": "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.",
      "condition": "",
      "sources": []
    },
    {
      "action": "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.",
      "success_rate": 0.75,
      "how": "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.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 `XGROUP SETID mystream mygroup 0-0` 将最后交付的ID重置为开头，然后使用 `XACK mystream mygroup <id1> <id2> ...` 手动确认所有待处理条目以清除PEL。",
    "如果流不重要，使用 `XREAD COUNT 10000 STREAMS mystream 0` 将流备份，然后删除并重新创建流和消费者组，并重放消息。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://redis.io/commands/xgroup-setid/",
  "official_doc_section": null,
  "error_code": "ERR",
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.78,
  "resolvable": "partial",
  "first_seen": "2024-02-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}