📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-7.15

简要来说,当您尝试删除当前正在进行快照的Elasticsearch索引时,会发生此错误。快照过程必须在任何删除操作发生之前完成。要解决此问题,您可以等待快照过程完成,或者手动停止快照过程。但是,停止快照过程可能导致数据备份不完整。另一种解决方案是使用"删除索引API"并将"ignore_unavailable"选项设置为true,这将只删除可用的索引,而忽略正在进行快照的索引。

日志上下文 #

日志"Cannot delete indices that are being snapshotted:“的类名是 MetadataDeleteIndexService.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入了解上下文的人使用:

}  // Check if index deletion conflicts with any running snapshots
 SetsnapshottingIndices = SnapshotsService.snapshottingIndices(currentState; indicesToDelete);
 if (snapshottingIndices.isEmpty() == false) {
 throw new SnapshotInProgressException("Cannot delete indices that are being snapshotted: " + snapshottingIndices +
 ". Try again after snapshot finishes or cancel the currently running snapshot.");
 }  RoutingTable.Builder routingTableBuilder = RoutingTable.builder(currentState.routingTable());
 Metadata.Builder metadataBuilder = Metadata.builder(meta);