{
  "id": "redis/rdb-checksum-mismatch-on-replica",
  "signature": "Error: RDB checksum mismatch: expected 0x8a2b3c4d but got 0x9e1f0a5b",
  "signature_zh": "错误：RDB 校验和不匹配：预期 0x8a2b3c4d 但得到 0x9e1f0a5b",
  "regex": "Error: 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": "During replication, the RDB file transferred from master to replica has been corrupted in transit or on disk, causing a checksum verification failure.",
  "root_cause_type": "generic",
  "root_cause_zh": "在复制过程中，从主节点传输到从节点的 RDB 文件在传输或磁盘上已损坏，导致校验和验证失败。",
  "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": "Retrying the replication without fixing the underlying network or disk issue will cause the same checksum mismatch on subsequent attempts.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling RDB checksums via rdb-checksum no in redis.conf removes the error but allows silent data corruption to propagate.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Restarting the replica without addressing the master's RDB file integrity may load a corrupted dataset from persistent storage.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "On the master, run a manual BGSAVE to generate a fresh RDB file, then on the replica, use REPLICAOF NO ONE and REPLICAOF master-ip master-port to trigger a full resync.",
      "success_rate": 0.8,
      "how": "On the master, run a manual BGSAVE to generate a fresh RDB file, then on the replica, use REPLICAOF NO ONE and REPLICAOF master-ip master-port to trigger a full resync.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check disk health on both master and replica using fsck or smartctl, and ensure network stability (e.g., TCP checksum offloading) to prevent corruption during transfer.",
      "success_rate": 0.75,
      "how": "Check disk health on both master and replica using fsck or smartctl, and ensure network stability (e.g., TCP checksum offloading) to prevent corruption during transfer.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the error persists, manually copy the RDB file from master to replica using rsync with checksum verification, then restart the replica to load the file.",
      "success_rate": 0.85,
      "how": "If the error persists, manually copy the RDB file from master to replica using rsync with checksum verification, then restart the replica to load the file.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在主节点上运行手动 BGSAVE 以生成新的 RDB 文件，然后在从节点上使用 REPLICAOF NO ONE 和 REPLICAOF master-ip master-port 触发完全重新同步。",
    "使用 fsck 或 smartctl 检查主节点和从节点的磁盘健康状况，并确保网络稳定性（例如 TCP 校验和卸载）以防止传输过程中的损坏。",
    "如果错误持续存在，使用带校验和验证的 rsync 手动将 RDB 文件从主节点复制到从节点，然后重启从节点加载文件。"
  ],
  "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": null,
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-09-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}