SOLR-10138: Transaction log replay can hit an NPE due to new Metrics code.

This commit is contained in:
Andrzej Bialecki 2017-02-15 16:28:36 +01:00
parent 9275c2f87f
commit f51253a331
2 changed files with 7 additions and 2 deletions

View File

@ -231,6 +231,8 @@ Bug Fixes
Default settings in solrconfig.xml /config/indexConfig/metrics have been changed to turn off
IndexWriter and Directory level metrics collection. (ab, ishan)
* SOLR-10138: Transaction log replay can hit an NPE due to new Metrics code. (ab)
================== 6.4.1 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -37,6 +37,7 @@ import org.apache.solr.common.SolrException.ErrorCode;
import org.apache.solr.common.util.IOUtils;
import org.apache.solr.core.PluginInfo;
import org.apache.solr.core.SolrCore;
import org.apache.solr.core.SolrInfoMBean;
import org.apache.solr.util.HdfsUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -121,7 +122,7 @@ public class HdfsUpdateLog extends UpdateLog {
String ulogDir = core.getCoreDescriptor().getUlogDir();
this.uhandler = uhandler;
synchronized (fsLock) {
// just like dataDir, we do not allow
// moving the tlog dir on reload
@ -259,7 +260,9 @@ public class HdfsUpdateLog extends UpdateLog {
}
}
// initialize metrics
core.getCoreMetricManager().registerMetricProducer(SolrInfoMBean.Category.TLOG.toString(), this);
}
@Override