{
  "id": "mongodb/transaction-aborted-due-to-catalog-operation",
  "signature": "MongoServerError: Transaction aborted due to a catalog operation",
  "signature_zh": "MongoServerError: 由于目录操作导致事务中止",
  "regex": "Transaction aborted due to a catalog operation",
  "domain": "mongodb",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A DDL operation (e.g., createIndex, dropCollection) was attempted on a namespace involved in an active multi-document transaction, which is not allowed.",
  "root_cause_type": "generic",
  "root_cause_zh": "在活动多文档事务涉及的命名空间上尝试了 DDL 操作（例如 createIndex、dropCollection），这是不允许的。",
  "versions": [
    {
      "version": "MongoDB 4.2.24",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MongoDB 5.0.18",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MongoDB 6.0.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing transaction timeout doesn't prevent catalog operations from aborting the transaction.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Retrying the same transaction without moving DDL operations outside will fail again.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Move DDL operations (e.g., createIndex, drop) outside the transaction session. Perform them before starting the transaction.",
      "success_rate": 0.9,
      "how": "Move DDL operations (e.g., createIndex, drop) outside the transaction session. Perform them before starting the transaction.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If DDL is unavoidable, use a separate session for DDL operations and ensure they complete before the transaction starts.",
      "success_rate": 0.85,
      "how": "If DDL is unavoidable, use a separate session for DDL operations and ensure they complete before the transaction starts.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Move DDL operations (e.g., createIndex, drop) outside the transaction session. Perform them before starting the transaction.",
    "If DDL is unavoidable, use a separate session for DDL operations and ensure they complete before the transaction starts."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.mongodb.com/docs/manual/core/transactions/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}