{
  "id": "mongodb/rollback-id-mismatch",
  "signature": "MongoServerError: Rollback ID mismatch: expected rollback ID 5 but received 3, aborting operation",
  "signature_zh": "MongoServerError: 回滚 ID 不匹配：预期回滚 ID 5 但收到 3，中止操作",
  "regex": "Rollback ID mismatch: expected rollback ID \\d+ but received \\d+, aborting operation",
  "domain": "mongodb",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "During a replica set rollback, the operation's recorded rollback ID does not match the current rollback ID, indicating a concurrent rollback or node state change.",
  "root_cause_type": "generic",
  "root_cause_zh": "在副本集回滚期间，操作记录的回滚 ID 与当前回滚 ID 不匹配，表示发生了并发回滚或节点状态更改。",
  "versions": [
    {
      "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 node may trigger another rollback with the same mismatch if the primary has diverged.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Forcing the node to become primary with rs.stepDown() on the current primary can cause data inconsistency.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Identify the inconsistent node and perform a full resync: remove the data directory, restart mongod, and let it resync from the primary using initial sync: db.adminCommand({replSetResync: 1}).",
      "success_rate": 0.8,
      "how": "Identify the inconsistent node and perform a full resync: remove the data directory, restart mongod, and let it resync from the primary using initial sync: db.adminCommand({replSetResync: 1}).",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the rollback is stuck, manually intervene by running rs.rollback() on the secondary to force a rollback to a consistent point, then re-enable replication.",
      "success_rate": 0.75,
      "how": "If the rollback is stuck, manually intervene by running rs.rollback() on the secondary to force a rollback to a consistent point, then re-enable replication.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "识别不一致的节点并执行完全重新同步：删除数据目录，重启 mongod，并使用 initial sync 从主节点重新同步：db.adminCommand({replSetResync: 1})。",
    "如果回滚卡住，在从节点上手动运行 rs.rollback() 强制回滚到一致点，然后重新启用复制。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.mongodb.com/docs/manual/reference/command/replSetRollback/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.75,
  "resolvable": "partial",
  "first_seen": "2024-09-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}