mirror of https://github.com/apache/lucene.git
SOLR-6551
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1632756 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
606901c6d5
commit
7644a6def6
|
@ -197,7 +197,7 @@ public class UpdateLog implements PluginInfoInitialized {
|
||||||
|
|
||||||
public long getTotalLogsSize() {
|
public long getTotalLogsSize() {
|
||||||
long size = 0;
|
long size = 0;
|
||||||
synchronized (logs) {
|
synchronized (this) {
|
||||||
for (TransactionLog log : logs) {
|
for (TransactionLog log : logs) {
|
||||||
size += log.getLogSize();
|
size += log.getLogSize();
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,9 @@ public class UpdateLog implements PluginInfoInitialized {
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTotalLogsNumber() {
|
public long getTotalLogsNumber() {
|
||||||
return logs.size();
|
synchronized (this) {
|
||||||
|
return logs.size();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public VersionInfo getVersionInfo() {
|
public VersionInfo getVersionInfo() {
|
||||||
|
@ -317,7 +319,7 @@ public class UpdateLog implements PluginInfoInitialized {
|
||||||
/* Takes over ownership of the log, keeping it until no longer needed
|
/* Takes over ownership of the log, keeping it until no longer needed
|
||||||
and then decrementing it's reference and dropping it.
|
and then decrementing it's reference and dropping it.
|
||||||
*/
|
*/
|
||||||
protected void addOldLog(TransactionLog oldLog, boolean removeOld) {
|
protected synchronized void addOldLog(TransactionLog oldLog, boolean removeOld) {
|
||||||
if (oldLog == null) return;
|
if (oldLog == null) return;
|
||||||
|
|
||||||
numOldRecords += oldLog.numRecords();
|
numOldRecords += oldLog.numRecords();
|
||||||
|
|
Loading…
Reference in New Issue