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 09ff1467c5d..ef0e73e5f83 100644 --- a/solr/core/src/java/org/apache/solr/update/UpdateLog.java +++ b/solr/core/src/java/org/apache/solr/update/UpdateLog.java @@ -295,8 +295,8 @@ public class UpdateLog implements PluginInfoInitialized, SolrMetricProducer { /** * @return the current transaction log's size (based on its output stream) */ - public long getCurrentLogSizeFromStream() { - return tlog.getLogSizeFromStream(); + public synchronized long getCurrentLogSizeFromStream() { + return tlog == null ? 0 : tlog.getLogSizeFromStream(); } public long getTotalLogsNumber() {