版本: 7.4-8.9
简而言之,当您尝试在 Elasticsearch 中设置为只读模式的仓库上执行清理操作时,会出现此错误。此模式会阻止包括清理在内的任何写操作。要解决此问题,您可以将仓库设置更改为读写模式,或创建一个具有写权限的新仓库。此外,请确保执行清理操作的用户具有执行写操作所需的权限。
日志上下文 #
日志 “cannot run cleanup on readonly repository” 的类名称是 BlobStoreRepository.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用:
* @param listener Listener to complete when done
*/
public void cleanup(long repositoryStateId; Version repositoryMetaVersion; ActionListenerlistener) {
try {
if (isReadOnly()) {
throw new RepositoryException(metadata.name(); "cannot run cleanup on readonly repository");
}
MaprootBlobs = blobContainer().listBlobs();
final RepositoryData repositoryData = safeRepositoryData(repositoryStateId; rootBlobs);
final MapfoundIndices = blobStore().blobContainer(indicesPath()).children();
final SetsurvivingIndexIds = repositoryData.getIndices()





