{
  "id": "kafka/partition-reassignment-failed-no-candidates",
  "signature": "AdminCommandFailedException: Partition reassignment failed due to no viable candidates",
  "signature_zh": "AdminCommandFailedException: 分区重新分配失败，因为没有可行的候选节点",
  "regex": "AdminCommandFailedException.*no viable candidates",
  "domain": "kafka",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The partition reassignment algorithm cannot find any broker that satisfies the specified constraints (e.g., rack awareness, resource limits).",
  "root_cause_type": "generic",
  "root_cause_zh": "分区重新分配算法无法找到任何满足指定约束条件（如机架感知、资源限制）的代理。",
  "versions": [
    {
      "version": "Kafka 3.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kafka 3.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kafka 3.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Forcing reassignment with `--force` flag without adjusting constraints",
      "why_fails": "The `--force` flag does not bypass viability checks; it only skips some safety checks, and the algorithm still fails.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually specifying a broker that is already at full disk capacity",
      "why_fails": "The broker cannot accept more partitions due to resource limits, and the reassignment will fail or degrade cluster performance.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add more brokers to the cluster or free up resources on existing brokers (e.g., delete unused topics, increase disk space). Then retry the reassignment with a balanced plan.",
      "success_rate": 0.75,
      "how": "Add more brokers to the cluster or free up resources on existing brokers (e.g., delete unused topics, increase disk space). Then retry the reassignment with a balanced plan.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the `--generate` option in `kafka-reassign-partitions.sh` to create a reassignment plan that respects current constraints, then execute it with `--execute`.",
      "success_rate": 0.8,
      "how": "Use the `--generate` option in `kafka-reassign-partitions.sh` to create a reassignment plan that respects current constraints, then execute it with `--execute`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Add more brokers to the cluster or free up resources on existing brokers (e.g., delete unused topics, increase disk space). Then retry the reassignment with a balanced plan.",
    "Use the `--generate` option in `kafka-reassign-partitions.sh` to create a reassignment plan that respects current constraints, then execute it with `--execute`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kafka.apache.org/documentation/#basic_ops_cluster_expansion",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.7,
  "resolvable": "partial",
  "first_seen": "2024-01-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}