# 409 Conflict：您尝试删除的对象版本不是最新版本。

- **ID:** `cloud/gcp-cloud-storage-bucket-object-versioning-conflict`
- **领域:** cloud
- **类别:** protocol_error
- **错误码:** `409`
- **验证级别:** ai_generated
- **修复率:** 95%

## 根因

当存储桶启用版本控制时，删除非最新对象版本需要指定代次编号，否则Cloud Storage返回409冲突。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| GCS JSON API v1 | active | — | — |
| Google Cloud Storage Client Library 2.x | active | — | — |
| gsutil 5.x | active | — | — |

## 解决方案

1. ```
   Use gsutil with generation number: `gsutil rm gs://bucket-name/object#<generation-number>`. To find generation numbers: `gsutil ls -la gs://bucket-name/object`.
   ```
2. ```
   Delete all versions of an object: `gsutil rm -a gs://bucket-name/object` (the -a flag removes all versions).
   ```

## 无效尝试

- **** — If bucket versioning is enabled, the API requires generation for deleting a specific version; the error persists. (95% 失败率)
- **** — Disabling versioning does not delete existing versions; you must suspend versioning and then delete each version separately. (70% 失败率)
- **** — gsutil rm without -a only deletes the live version; non-current versions remain and cause conflict errors. (85% 失败率)
