elasticsearch resource_error ai_generated true

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

其他格式: JSON · Markdown 中文 · English
83%修复率
86%置信度
1证据数
2024-03-10首次发现

版本兼容性

版本状态引入弃用备注
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.

generic

官方文档

https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-take-snapshot.html

解决方案

  1. Check the current snapshot status and wait for completion: GET _snapshot/my_repo/_current
  2. Abort the running snapshot gracefully: POST _snapshot/my_repo/snapshot_name/_cancel
  3. Increase the snapshot timeout to allow longer operations: PUT _cluster/settings { "persistent": { "snapshot.max_concurrent_operations": 2 } } (requires Elasticsearch 8.0+)

无效尝试

常见但无效的做法:

  1. 80% 失败

    Deleting an in-progress snapshot may cause repository corruption or leave partial data. It is not recommended.

  2. 95% 失败

    Snapshot state is persisted in the repository metadata, not just memory. Restarting nodes does not release the lock.

  3. 60% 失败

    This does not resolve the conflict for the original repository; it only creates a workaround that may not be feasible for production.