elasticsearch
runtime_error
ai_generated
true
快照删除异常:[my_repo:snapshot_2025] 无法删除快照 - 当前有快照正在进行中
SnapshotDeleteException: [my_repo:snapshot_2025] cannot delete snapshot - a snapshot is currently in progress
ID: elasticsearch/snapshot-in-progress-delete-failed
90%修复率
86%置信度
1证据数
2025-01-12首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| elasticsearch 7.17 | active | — | — | — |
| elasticsearch 8.11 | active | — | — | — |
| elasticsearch 8.12 | active | — | — | — |
根因分析
删除快照操作失败,因为同一仓库中的另一个快照当前正在创建或恢复中。
English
A delete operation on a snapshot fails because another snapshot in the same repository is currently being created or restored.
官方文档
https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-snapshot-api.html解决方案
-
等待正在进行的快照完成,通过监控快照状态:GET _snapshot/my_repo/_all 并检查 'IN_PROGRESS' 状态,然后重试删除。
-
如果正在进行的快照卡住,则中止它:DELETE _snapshot/my_repo/snapshot_in_progress_name(如果快照名称已知)。
-
增加快照超时设置以避免长时间运行的快照:PUT _cluster/settings { "transient": { "snapshot.max_concurrent_operations": 1 } } 以序列化操作。
无效尝试
常见但无效的做法:
-
85% 失败
Direct file deletion can corrupt the repository metadata, making all snapshots in the repository unusable.
-
70% 失败
Restarting may leave the snapshot in an inconsistent state, requiring manual cleanup and potentially losing data.
-
65% 失败
Creating a new snapshot while another is in progress can also fail with a ConcurrentSnapshotExecutionException.