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

版本: 6.8-7.13

简要来说,当 Elasticsearch 检测到用于存储、快照和恢复数据的仓库已损坏时,就会发生此错误。这可能是由于硬件故障、网络问题或软件 bug 等问题导致的。要解决此问题,您可以尝试以下方法:1) 如果有可用备份,请从备份中恢复数据。2) 尽可能尝试修复仓库。3) 检查底层存储系统是否存在任何问题并修复它们。4) 如果损坏的仓库不是关键仓库,您可以删除并重新创建它。始终确保拥有可靠的备份策略以防止数据丢失。

日志上下文 #

日志 “Detected a corrupted repository; index” 的类名是 RepositoryData.java。 我们从 Elasticsearch 源代码中提取了以下内容,供寻求深入背景的人参考:

final SnapshotId snapshotId = snapshots.get(uuid);
 if (snapshotId == null) {
 // A snapshotted index references a snapshot which does not exist in
 // the list of snapshots. This can happen when multiple clusters in
 // different versions create or delete snapshot in the same repository.
 throw new ElasticsearchParseException("Detected a corrupted repository; index " + indexId
 + " references an unknown snapshot uuid [" + uuid + "]");
 }
 snapshotIds.add(snapshotId);
 }
 break;