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

版本: 6.8-7.2

简而言之,当 Elasticsearch 尝试从已设置为只读的仓库中删除数据时,会发生此错误。这可能是由于权限不正确或配置错误造成的。要解决此问题,您可以更改仓库的权限以允许写入操作,或确保没有对只读仓库执行删除操作。此外,请检查您的 Elasticsearch 配置,确保不会错误地将仓库设置为只读。

日志上下文 #

日志 “unexpectedly deleting [” + path + “] from a readonly repository” 的类名是 FsBlobStore.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入理解的人参考:

@Override
 public void delete(BlobPath path) throws IOException {
 assert readOnly == false : "should not delete anything from a readonly repository: " + path;
 //noinspection ConstantConditions in case assertions are disabled
 if (readOnly) {
 throw new ElasticsearchException("unexpectedly deleting [" + path + "] from a readonly repository");
 }
 IOUtils.rm(buildPath(path));
 }  @Override