--- title: "另一个快照正在运行,无法删除 – 如何解决此Elasticsearch异常" date: 2026-03-15 lastmod: 2026-03-15 description: "当尝试在Elasticsearch中删除快照时,如果另一个快照操作仍在运行,会出现此错误。Elasticsearch不允许同时进行快照操作以防止数据不一致。" tags: ["快照管理", "并发控制", "快照删除"] summary: " 版本: 6.8-7.7 简而言之,当您尝试在Elasticsearch中删除快照,而另一个快照操作仍在运行时,会出现此错误。Elasticsearch不允许同时进行快照操作,以防止数据不一致。要解决此问题,您可以等待当前的快照操作完成后再删除,或者使用"删除快照API"手动停止正在运行的快照操作。但请谨慎操作,因为中断快照操作可能导致快照不完整。 日志上下文 # 日志"another snapshot is currently running cannot delete"的类名是 SnapshotsService.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考: SnapshotsInProgress.Entry snapshotEntry = snapshots != null ? snapshots.snapshot(snapshot) : null; if (snapshotEntry == null) { // 此快照未运行 - 可以删除 if (snapshots != null && !snapshots.entries().isEmpty()) { // 但其他快照正在运行 - 无法继续 throw new ConcurrentSnapshotExecutionException(snapshot; "another snapshot is currently running cannot delete"); } // 将快照删除添加到集群状态 SnapshotDeletionsInProgress.Entry entry = new SnapshotDeletionsInProgress.Entry( snapshot; threadPool.absoluteTimeInMillis(); " --- > **版本:** 6.8-7.7 简而言之,当您尝试在Elasticsearch中删除快照,而另一个快照操作仍在运行时,会出现此错误。Elasticsearch不允许同时进行快照操作,以防止数据不一致。要解决此问题,您可以等待当前的快照操作完成后再删除,或者使用"删除快照API"手动停止正在运行的快照操作。但请谨慎操作,因为中断快照操作可能导致快照不完整。 日志上下文 ----------- 日志"another snapshot is currently running cannot delete"的类名是[SnapshotsService.java。](https://www.geeksforgeeks.org/java-lang-class-class-java-set-1/) 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考: ```java SnapshotsInProgress.Entry snapshotEntry = snapshots != null ? snapshots.snapshot(snapshot) : null; if (snapshotEntry == null) { // 此快照未运行 - 可以删除 if (snapshots != null && !snapshots.entries().isEmpty()) { // 但其他快照正在运行 - 无法继续 throw new ConcurrentSnapshotExecutionException(snapshot; "another snapshot is currently running cannot delete"); } // 将快照删除添加到集群状态 SnapshotDeletionsInProgress.Entry entry = new SnapshotDeletionsInProgress.Entry( snapshot; threadPool.absoluteTimeInMillis(); ```