{
  "id": "redis/rdb-checksum-mismatch",
  "signature": "RDB checksum mismatch: expected 0x<hex> but got 0x<hex>",
  "signature_zh": "RDB 校验和不匹配：期望 0x<hex> 但得到 0x<hex>",
  "regex": "RDB checksum mismatch: expected 0x[0-9a-fA-F]+ but got 0x[0-9a-fA-F]+",
  "domain": "redis",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The RDB file on disk has been corrupted or truncated, causing its checksum to not match the expected value calculated by Redis during loading.",
  "root_cause_type": "generic",
  "root_cause_zh": "磁盘上的 RDB 文件已损坏或被截断，导致其校验和与 Redis 加载时计算的值不匹配。",
  "versions": [
    {
      "version": "Redis 6.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Redis 7.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Redis 7.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Redis will fail to load the same corrupted RDB file again, causing repeated crashes or startup failures.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "RDB files are binary and have a complex structure; manual editing almost always results in further corruption.",
      "fail_rate": 0.99,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Deleting the RDB file causes total data loss; it is only acceptable if backups exist.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Restore from a recent backup RDB file: copy the backup to the dump directory and restart Redis. Example: cp /backup/dump.rdb /var/lib/redis/dump.rdb; systemctl restart redis.",
      "success_rate": 0.9,
      "how": "Restore from a recent backup RDB file: copy the backup to the dump directory and restart Redis. Example: cp /backup/dump.rdb /var/lib/redis/dump.rdb; systemctl restart redis.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use redis-check-rdb to repair the file: run redis-check-rdb /var/lib/redis/dump.rdb to fix minor corruption. If unrecoverable, use AOF file as fallback if enabled.",
      "success_rate": 0.75,
      "how": "Use redis-check-rdb to repair the file: run redis-check-rdb /var/lib/redis/dump.rdb to fix minor corruption. If unrecoverable, use AOF file as fallback if enabled.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Enable AOF persistence alongside RDB to reduce reliance on RDB. Set appendonly yes in redis.conf and restart.",
      "success_rate": 0.85,
      "how": "Enable AOF persistence alongside RDB to reduce reliance on RDB. Set appendonly yes in redis.conf and restart.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Restore from a recent backup RDB file: copy the backup to the dump directory and restart Redis. Example: cp /backup/dump.rdb /var/lib/redis/dump.rdb; systemctl restart redis.",
    "Use redis-check-rdb to repair the file: run redis-check-rdb /var/lib/redis/dump.rdb to fix minor corruption. If unrecoverable, use AOF file as fallback if enabled.",
    "Enable AOF persistence alongside RDB to reduce reliance on RDB. Set appendonly yes in redis.conf and restart."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/",
  "official_doc_section": null,
  "error_code": "ERM",
  "verification_tier": "ai_generated",
  "confidence": 0.92,
  "fix_success_rate": 0.75,
  "resolvable": "partial",
  "first_seen": "2023-06-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}