mirror of https://github.com/apache/lucene.git
SOLR-11277: Synchronize UpdateLog.getCurrentLogSizeFromStream and return size of tlog as 0 to avoid NPE
This commit is contained in:
parent
b1ee23c525
commit
27c6275c48
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue