版本: 7.6-7.13
简要来说,当您尝试从快照恢复索引时,但由于快照过程中的中断或失败导致索引未完全保存,就会出现此错误。这会产生一个无法恢复的部分索引。要解决此问题,您可以重新尝试快照过程并确保没有中断,或者从之前成功的快照进行恢复。如果这两种方法都不可行,您可能需要从原始数据源重新构建索引。
日志上下文 #
日志 “cannot restore partial index [” 的类名是 RestoreService.java。 我们从 Elasticsearch 源代码中提取了以下内容,为那些需要深入了解上下文的人提供参考:
"with same name already exists in the cluster. Either close or delete the existing index or restore the " +
"index under a different name by providing a rename pattern and replacement name");
}
// Index exist - checking if it's partial restore
if (partial) {
throw new SnapshotRestoreException(snapshot; "cannot restore partial index [" + renamedIndex
+ "] because such index already exists");
}
// Make sure that the number of shards is the same. That's the only thing that we cannot change
if (currentIndexMetadata.getNumberOfShards() != snapshotIndexMetadata.getNumberOfShards()) {
throw new SnapshotRestoreException(snapshot;





