{
  "id": "cloud/azure-blob-storage-lease-conflict-on-snapshot",
  "signature": "409 Conflict: The lease ID specified did not match the lease ID of the blob snapshot",
  "signature_zh": "409 冲突：指定的租约 ID 与 Blob 快照的租约 ID 不匹配",
  "regex": "409.*lease ID.*snapshot|LeaseIdMismatchWithBlobSnapshot|The lease ID specified did not match",
  "domain": "cloud",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "When attempting to delete or modify a blob that has an active lease, the operation fails if the lease ID is not provided correctly, especially when the blob has snapshots that inherit or require separate lease management.",
  "root_cause_type": "generic",
  "root_cause_zh": "当尝试删除或修改具有活动租约的 Blob 时，如果未正确提供租约 ID，操作将失败，尤其是当 Blob 具有继承或需要单独租约管理的快照时。",
  "versions": [
    {
      "version": "Azure Storage REST API: 2019-07-07",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Azure SDK for .NET: >= 12.10.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Azure Portal: latest",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the lease is still active, the delete operation fails with a 409 error; the lease must be explicitly released or renewed.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The Azure Storage API requires an exact lease ID match; wildcards are not supported.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Snapshots may have their own leases or inherit the base blob's lease; deleting them without the correct lease ID can also fail.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Retrieve the current lease ID by calling 'Get Blob Properties' and then use that lease ID in the delete request. Example in Azure CLI: 'az storage blob lease break --account-name <storage-account> --container-name <container> --blob-name <blob> --lease-duration -1' then delete with 'az storage blob delete --account-name <storage-account> --container-name <container> --name <blob> --lease-id <lease-id>'.",
      "success_rate": 0.9,
      "how": "Retrieve the current lease ID by calling 'Get Blob Properties' and then use that lease ID in the delete request. Example in Azure CLI: 'az storage blob lease break --account-name <storage-account> --container-name <container> --blob-name <blob> --lease-duration -1' then delete with 'az storage blob delete --account-name <storage-account> --container-name <container> --name <blob> --lease-id <lease-id>'.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the blob has snapshots, delete the snapshots first with the same lease ID, then delete the base blob. Use 'az storage blob delete --account-name <storage-account> --container-name <container> --name <blob> --delete-snapshots include --lease-id <lease-id>'.",
      "success_rate": 0.85,
      "how": "If the blob has snapshots, delete the snapshots first with the same lease ID, then delete the base blob. Use 'az storage blob delete --account-name <storage-account> --container-name <container> --name <blob> --delete-snapshots include --lease-id <lease-id>'.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Retrieve the current lease ID by calling 'Get Blob Properties' and then use that lease ID in the delete request. Example in Azure CLI: 'az storage blob lease break --account-name <storage-account> --container-name <container> --blob-name <blob> --lease-duration -1' then delete with 'az storage blob delete --account-name <storage-account> --container-name <container> --name <blob> --lease-id <lease-id>'.",
    "If the blob has snapshots, delete the snapshots first with the same lease ID, then delete the base blob. Use 'az storage blob delete --account-name <storage-account> --container-name <container> --name <blob> --delete-snapshots include --lease-id <lease-id>'."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob#status-codes",
  "official_doc_section": null,
  "error_code": "409 Conflict",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-09-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}