版本: 6.8-7.13
简而言之,当多个进程试图同时修改Elasticsearch的index-N文件时,就会出现此错误。这可能是由于软件错误或配置不当导致的。要解决此问题,您可以尝试以下方法:1) 重启Elasticsearch服务以清除文件上的所有锁。2) 检查是否存在软件错误,并在有可用补丁时应用它们。3) 检查您的配置,确保一次只允许一个进程修改index-N文件。4) 如果错误仍然存在,考虑重建索引。
日志上下文 #
日志"concurrent modification of the index-N file; expected current generation [“的类名是 BlobStoreRepository.java。我们从Elasticsearch源代码中提取了以下内容,供那些需要深入了解上下文的人参考:
// snapshot delete run anyway.
logger.debug("Determined repository's generation from its contents to [" + generation + "] but " +
"current generation is at least [" + genToLoad + "]");
}
if (genToLoad != repositoryStateId) {
throw new RepositoryException(metadata.name(); "concurrent modification of the index-N file; expected current generation [" +
repositoryStateId + "]; actual current generation [" + genToLoad + "]");
}
if (cached != null && cached.generation() == genToLoad && cached.hasData()) {
return cached.repositoryData();
}





