{
  "id": "redis/stream-consumer-group-offset-rollback",
  "signature": "ERR Consumer group offset rollback detected: last-delivered-id < oldest-id",
  "signature_zh": "检测到消费者组偏移回滚：last-delivered-id < oldest-id",
  "regex": "ERR Consumer group offset rollback detected: last-delivered-id < oldest-id",
  "domain": "redis",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The stream was trimmed or deleted, causing the consumer group's last-delivered-id to be older than the oldest entry in the stream, leading to an inconsistent state.",
  "root_cause_type": "generic",
  "root_cause_zh": "流被修剪或删除，导致消费者组的 last-delivered-id 早于流中最旧的条目，导致状态不一致。",
  "versions": [
    {
      "version": "6.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "7.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "May cause duplicate processing of already-consumed messages.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Loses all pending messages and consumer state; not suitable for production.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Consumer group will be stuck; no new messages delivered.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Run 'XGROUP SETID mystream mygroup 0-0' to reset to the beginning, then use XREADGROUP to re-process from the oldest entry.",
      "success_rate": 0.92,
      "how": "Run 'XGROUP SETID mystream mygroup 0-0' to reset to the beginning, then use XREADGROUP to re-process from the oldest entry.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Set XTRIM with a minimum ID that is older than the group's last-delivered-id: 'XTRIM mystream MINID ~ <last-delivered-id>'.",
      "success_rate": 0.88,
      "how": "Set XTRIM with a minimum ID that is older than the group's last-delivered-id: 'XTRIM mystream MINID ~ <last-delivered-id>'.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "运行 'XGROUP SETID mystream mygroup 0-0' 重置到开头，然后使用 XREADGROUP 从最旧条目重新处理。",
    "设置 XTRIM 的最小 ID 早于组的 last-delivered-id：'XTRIM mystream MINID ~ <last-delivered-id>'。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://redis.io/docs/latest/commands/xgroup-setid/",
  "official_doc_section": null,
  "error_code": "ERM",
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-01-25",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}