当从属设备复制索引时,它会创建一个名称格式为的索引目录
index.timestamp
下次复制它时会尝试清理并创建一个带有新时间戳的新文件夹但在我的情况下它没有发生,每当我看到这个警告时,Slave会触发一个fullCopy
Unable to cleanup unused lucene index files so we must do a full copy instead
任何人为什么奴隶都无法清理未使用的索引文件。
谢谢
答案 0 :(得分:3)
如果不知道你的solr版本,就很难回答。
根据我的经验,solr会复制不同的索引文件(比时间戳更新)。但是,如果合并索引,则会触发完整副本。
以下是一些相关的门票
https://issues.apache.org/jira/browse/SOLR-6640
**更新11/27/2017 **
这是5x分支中的相关部分,
try {
IndexWriter indexWriter = writer.get();
int c = 0;
indexWriter.deleteUnusedFiles();
while (hasUnusedFiles(indexDir, commit)) {
indexWriter.deleteUnusedFiles();
LOG.info("Sleeping for 1000ms to wait for unused lucene index files to be delete-able");
Thread.sleep(1000);
c++;
if (c >= 30) {
LOG.warn("IndexFetcher unable to cleanup unused lucene index files so we must do a full copy instead");
isFullCopyNeeded = true;
break;
}
}
if (c > 0) {
LOG.info("IndexFetcher slept for " + (c * 1000) + "ms for unused lucene index files to be delete-able");
}
} finally {
writer.decref();
}
因此,您有超过30个未使用的索引文件,这将触发警告消息&完整副本。 我会尝试优化或合并主服务器中的索引,并查看是否复制了fullCopy。