{
  "id": "database/mysql-slow-replica-lag-bytes-behind",
  "signature": "ERROR: Relay log read failure: could not parse relay log event. The slave is stopped. Last_IO_Error: error reading relay log event: relay log read failure",
  "signature_zh": "错误：中继日志读取失败：无法解析中继日志事件。从服务器已停止。Last_IO_Error：读取中继日志事件错误：中继日志读取失败",
  "regex": "Relay log read failure: could not parse relay log event",
  "domain": "database",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "MySQL relay log is corrupted or truncated, often due to disk I/O errors or abrupt server shutdown during replication.",
  "root_cause_type": "generic",
  "root_cause_zh": "MySQL 中继日志损坏或被截断，通常是由于磁盘 I/O 错误或复制过程中服务器意外关闭。",
  "versions": [
    {
      "version": "MySQL 5.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MySQL 8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MySQL 8.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Restart the MySQL replica service without fixing the relay log",
      "why_fails": "The corrupted relay log persists and will be re-read, causing the same error immediately.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually delete relay log files and restart replication without resetting",
      "why_fails": "MySQL still expects the relay log index to reference the deleted files, leading to further errors.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "STOP SLAVE; RESET SLAVE; CHANGE MASTER TO ...; START SLAVE; (reinitialize replication from scratch using SHOW SLAVE STATUS to get the correct master log file and position, or use GTID if enabled)",
      "success_rate": 0.85,
      "how": "STOP SLAVE; RESET SLAVE; CHANGE MASTER TO ...; START SLAVE; (reinitialize replication from scratch using SHOW SLAVE STATUS to get the correct master log file and position, or use GTID if enabled)",
      "condition": "",
      "sources": []
    },
    {
      "action": "STOP SLAVE; SET GLOBAL relay_log_purge=0; START SLAVE; (if the error is transient, this may skip the bad event but risks data inconsistency)",
      "success_rate": 0.7,
      "how": "STOP SLAVE; SET GLOBAL relay_log_purge=0; START SLAVE; (if the error is transient, this may skip the bad event but risks data inconsistency)",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "STOP SLAVE; RESET SLAVE; CHANGE MASTER TO ...; START SLAVE; (reinitialize replication from scratch using SHOW SLAVE STATUS to get the correct master log file and position, or use GTID if enabled)",
    "STOP SLAVE; SET GLOBAL relay_log_purge=0; START SLAVE; (if the error is transient, this may skip the bad event but risks data inconsistency)"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://dev.mysql.com/doc/refman/8.0/en/replication-options-replica.html",
  "official_doc_section": null,
  "error_code": "1594",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.75,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}