{
  "id": "mongodb/oplog-truncation-after-point-in-time-recovery",
  "signature": "MongoServerError: OplogTruncationFailed: oplog entry truncated during recovery for namespace local.oplog.rs",
  "signature_zh": "MongoServerError: OplogTruncationFailed: 恢复期间命名空间 local.oplog.rs 的 oplog 条目被截断",
  "regex": "OplogTruncationFailed.*oplog entry truncated during recovery for namespace local\\.oplog\\.rs",
  "domain": "mongodb",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "During point-in-time recovery from a backup, the oplog was truncated because the recovery timestamp exceeded the oplog window or the oplog was corrupted.",
  "root_cause_type": "generic",
  "root_cause_zh": "从备份进行时间点恢复期间，由于恢复时间戳超出 oplog 窗口或 oplog 损坏，oplog 被截断。",
  "versions": [
    {
      "version": "MongoDB 6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MongoDB 7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MongoDB 8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Oplog size change affects future operations, not past truncation.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Incompatible backup may have different oplog range, causing further errors.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Direct modification can corrupt the replica set and cause data loss.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Perform a full resync of the affected secondary from a healthy primary using rs.reconfig() or initial sync.",
      "success_rate": 0.8,
      "how": "Perform a full resync of the affected secondary from a healthy primary using rs.reconfig() or initial sync.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use mongodump/mongorestore with --oplogReplay to restore from a backup that includes a consistent oplog window.",
      "success_rate": 0.75,
      "how": "Use mongodump/mongorestore with --oplogReplay to restore from a backup that includes a consistent oplog window.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the primary is affected, promote a secondary with a valid oplog using rs.stepDown() and rs.reconfig().",
      "success_rate": 0.7,
      "how": "If the primary is affected, promote a secondary with a valid oplog using rs.stepDown() and rs.reconfig().",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Perform a full resync of the affected secondary from a healthy primary using rs.reconfig() or initial sync.",
    "Use mongodump/mongorestore with --oplogReplay to restore from a backup that includes a consistent oplog window.",
    "If the primary is affected, promote a secondary with a valid oplog using rs.stepDown() and rs.reconfig()."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.8,
  "fix_success_rate": 0.7,
  "resolvable": "partial",
  "first_seen": "2024-03-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}