ConcurrentSnapshotExecutionException: [my_repo:snapshot_2025] 无法创建快照 - 仓库 [my_repo] 已有快照正在进行中
ConcurrentSnapshotExecutionException: [my_repo:snapshot_2025] cannot create snapshot - a snapshot is already in progress for repository [my_repo]
ID: elasticsearch/snapshot-in-progress
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 7.10.0 | active | — | — | — |
| 7.17.0 | active | — | — | — |
| 8.0.0 | active | — | — | — |
| 8.9.0 | active | — | — | — |
根因分析
同一仓库已有快照操作正在进行中,默认情况下 Elasticsearch 不允许对同一仓库执行并发快照。
English
A snapshot operation is already running for the same repository, and Elasticsearch does not allow concurrent snapshots to the same repository by default.
官方文档
https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-take-snapshot.html解决方案
-
Check the current snapshot status and wait for completion: GET _snapshot/my_repo/_current
-
Abort the running snapshot gracefully: POST _snapshot/my_repo/snapshot_name/_cancel
-
Increase the snapshot timeout to allow longer operations: PUT _cluster/settings { "persistent": { "snapshot.max_concurrent_operations": 2 } } (requires Elasticsearch 8.0+)
无效尝试
常见但无效的做法:
-
80% 失败
Deleting an in-progress snapshot may cause repository corruption or leave partial data. It is not recommended.
-
95% 失败
Snapshot state is persisted in the repository metadata, not just memory. Restarting nodes does not release the lock.
-
60% 失败
This does not resolve the conflict for the original repository; it only creates a workaround that may not be feasible for production.