{
  "id": "mongodb/oplog-truncated-during-replication",
  "signature": "MongoServerError: OplogTruncated: replication has fallen too far behind",
  "signature_zh": "MongoServerError: OplogTruncated: 复制落后太多",
  "regex": "OplogTruncated",
  "domain": "mongodb",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "A secondary member's replication lag exceeds the oplog window, so the oplog entries needed for catch-up have been overwritten.",
  "root_cause_type": "generic",
  "root_cause_zh": "从节点的复制延迟超过 oplog 窗口，导致追赶所需的 oplog 条目已被覆盖。",
  "versions": [
    {
      "version": "mongodb-4.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "mongodb-5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Restarting the secondary does not recover lost oplog; it will still be behind.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Increasing oplog size after the truncation does not restore already lost entries.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Resync the secondary from scratch by removing its data directory and allowing initial sync.",
      "success_rate": 0.95,
      "how": "Resync the secondary from scratch by removing its data directory and allowing initial sync.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase oplog size proactively to prevent future truncation, then resync.",
      "success_rate": 0.8,
      "how": "Increase oplog size proactively to prevent future truncation, then resync.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Resync the secondary from scratch by removing its data directory and allowing initial sync.",
    "Increase oplog size proactively to prevent future truncation, then resync."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.mongodb.com/docs/manual/replication/#oplog-size",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-09-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}