Skip to content

Apache Lucene open-source search software

SOLR-11929: UpdateLog metrics are not initialized on core reload

Steve Rowe8e276b90f520
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 091ce9410bd..6a41c8dec26 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -107,7 +107,9 @@ Bug Fixes
(Susheel Kumar, Aibao Luo, Nikkolay Martinov via Erick Erickson)
* SOLR-12172: Fixed race condition that could cause an invalid set of collection properties to be kept in
- memory when multiple collection property changes are done in a short period of time. (Tomás Fernández Löbbe)
+ memory when multiple collection property changes are done in a short period of time. (Tomás Fernández Löbbe)
+
+* SOLR-11929: UpdateLog metrics are not initialized on core reload. (ab, Steve Rowe)
Optimizations
----------------------
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateLog.java b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
index 4ca4bf269c0..fbdf616f711 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateLog.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
@@ -347,13 +347,12 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer {
this.uhandler = uhandler;
if (dataDir.equals(lastDataDir)) {
+ versionInfo.reload();
+ core.getCoreMetricManager().registerMetricProducer(SolrInfoBean.Category.TLOG.toString(), this);
+
if (debug) {
log.debug("UpdateHandler init: tlogDir=" + tlogDir + ", next id=" + id, " this is a reopen... nothing else to do.");
}
-
- versionInfo.reload();
-
- // on a normal reopen, we currently shouldn't have to do anything
return;
}
lastDataDir = dataDir;