accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [3/7] accumulo git commit: ACCUMULO-2871 Fix inconsistent synchronization
Date Thu, 28 May 2015 20:57:11 GMT
ACCUMULO-2871 Fix inconsistent synchronization

* Access currentLogs in Tablet synchronized on Tablet.this, in the same
* way as 1.7 does.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/6f7bf39b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/6f7bf39b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/6f7bf39b

Branch: refs/heads/master
Commit: 6f7bf39b7a00ab080641958caaefa576ca2fad68
Parents: cd5f184
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Thu May 28 16:28:53 2015 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu May 28 16:31:46 2015 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/accumulo/tserver/Tablet.java    | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/6f7bf39b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
index 6fe2f31..8faa3dc 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
@@ -3657,12 +3657,10 @@ public class Tablet {
 
   private Set<DfsLogger> currentLogs = new HashSet<DfsLogger>();
 
-  public Set<String> getCurrentLogFiles() {
+  public synchronized Set<String> getCurrentLogFiles() {
     Set<String> result = new HashSet<String>();
-    synchronized (currentLogs) {
-      for (DfsLogger log : currentLogs) {
-        result.add(log.getFileName());
-      }
+    for (DfsLogger log : currentLogs) {
+      result.add(log.getFileName());
     }
     return result;
   }


Mime
View raw message