accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject accumulo git commit: ACCUMULO-3601 Synchronize on map while copying keyset
Date Tue, 24 Feb 2015 03:07:39 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master ae7c2d257 -> fb5410a04


ACCUMULO-3601 Synchronize on map while copying keyset

Prevents ConcurrentModificationException.


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

Branch: refs/heads/master
Commit: fb5410a0468e65067fcfae20c2bd6ae607f9e7ce
Parents: ae7c2d2
Author: Josh Elser <elserj@apache.org>
Authored: Mon Feb 23 22:06:38 2015 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Mon Feb 23 22:06:38 2015 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/accumulo/master/Master.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fb5410a0/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 81339ad..9277d8b 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -1534,6 +1534,10 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
 
   @Override
   public Collection<KeyExtent> migrations() {
-    return migrations.keySet();
+    Set<KeyExtent> migrationKeys = new HashSet<KeyExtent>();
+    synchronized (migrations) {
+      migrationKeys.addAll(migrations.keySet());
+    }
+    return migrationKeys;
   }
 }


Mime
View raw message