{
  "id": "mongodb/oplog-too-small-for-replication",
  "signature": "MongoServerError: OplogStartMissing: no oplog entry found for timestamp",
  "signature_zh": "MongoServerError：OplogStartMissing：未找到时间戳的操作日志条目",
  "regex": "OplogStartMissing:\\s*no oplog entry found for timestamp",
  "domain": "mongodb",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The secondary replica set member fell too far behind and the primary's oplog has already rolled over the required entry.",
  "root_cause_type": "generic",
  "root_cause_zh": "副本集从节点落后太多，主节点的操作日志已覆盖所需条目。",
  "versions": [
    {
      "version": "mongodb 7.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 5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "mongodb 4.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The oplog gap remains; the secondary will still fail to sync.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Oplog size is set on the primary; secondary can't modify it.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Resync the secondary by deleting its data directory and restarting: rm -rf /var/lib/mongodb/* && systemctl restart mongod",
      "success_rate": 0.95,
      "how": "Resync the secondary by deleting its data directory and restarting: rm -rf /var/lib/mongodb/* && systemctl restart mongod",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the primary's oplog size to prevent future gaps: db.adminCommand({ replSetResizeOplog: 1, size: 40960 }) (set to 40GB)",
      "success_rate": 0.8,
      "how": "Increase the primary's oplog size to prevent future gaps: db.adminCommand({ replSetResizeOplog: 1, size: 40960 }) (set to 40GB)",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "通过删除从节点的数据目录并重启来重新同步：rm -rf /var/lib/mongodb/* && systemctl restart mongod",
    "增加主节点的操作日志大小以防止未来差距：db.adminCommand({ replSetResizeOplog: 1, size: 40960 })（设置为40GB）"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.mongodb.com/docs/manual/tutorial/resync-replica-set-member/",
  "official_doc_section": null,
  "error_code": "133",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.85,
  "resolvable": "partial",
  "first_seen": "2024-03-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}