You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2014/10/18 13:20:08 UTC
svn commit: r1632757 - in /lucene/dev/branches/branch_5x: ./ solr/
solr/core/ solr/core/src/java/org/apache/solr/update/UpdateLog.java
Author: noble
Date: Sat Oct 18 11:20:07 2014
New Revision: 1632757
URL: http://svn.apache.org/r1632757
Log:
SOLR-6551
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/ (props changed)
lucene/dev/branches/branch_5x/solr/core/ (props changed)
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/UpdateLog.java
Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/UpdateLog.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/UpdateLog.java?rev=1632757&r1=1632756&r2=1632757&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/UpdateLog.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/update/UpdateLog.java Sat Oct 18 11:20:07 2014
@@ -197,7 +197,7 @@ public class UpdateLog implements Plugin
public long getTotalLogsSize() {
long size = 0;
- synchronized (logs) {
+ synchronized (this) {
for (TransactionLog log : logs) {
size += log.getLogSize();
}
@@ -206,7 +206,9 @@ public class UpdateLog implements Plugin
}
public long getTotalLogsNumber() {
- return logs.size();
+ synchronized (this) {
+ return logs.size();
+ }
}
public VersionInfo getVersionInfo() {
@@ -317,7 +319,7 @@ public class UpdateLog implements Plugin
/* Takes over ownership of the log, keeping it until no longer needed
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;
numOldRecords += oldLog.numRecords();