accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [1/2] git commit: ACCUMULO-1567 fixed issue with recently split tablets not being assigned
Date Tue, 08 Oct 2013 19:02:41 GMT
Updated Branches:
  refs/heads/master dab1be962 -> e70a40dba


ACCUMULO-1567 fixed issue with recently split tablets not being assigned


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

Branch: refs/heads/master
Commit: 53fb6c7635f41c4376649e85f3ec9226aa6a56b0
Parents: dab1be9
Author: Keith Turner <kturner@apache.org>
Authored: Tue Oct 8 14:21:55 2013 -0400
Committer: Keith Turner <kturner@apache.org>
Committed: Tue Oct 8 14:21:55 2013 -0400

----------------------------------------------------------------------
 .../server/tabletserver/TabletServer.java       | 26 +++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/53fb6c76/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
index 6ccd163..d3c554b 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
@@ -2199,23 +2199,27 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
             Set<KeyExtent> openingOverlapping = KeyExtent.findOverlapping(extent, openingTablets);
             Set<KeyExtent> onlineOverlapping = KeyExtent.findOverlapping(extent, onlineTablets);
             
-            // ignore any tablets that have recently split
-            Iterator<KeyExtent> each = onlineOverlapping.iterator();
-            while (each.hasNext()) {
-              Tablet tablet = onlineTablets.get(each.next());
-              if (System.currentTimeMillis() - tablet.getSplitCreationTime() < RECENTLY_SPLIT_MILLIES)
{
-                each.remove();
-              }
-            }
-            
             Set<KeyExtent> all = new HashSet<KeyExtent>();
             all.addAll(unopenedOverlapping);
             all.addAll(openingOverlapping);
             all.addAll(onlineOverlapping);
             
             if (!all.isEmpty()) {
-              if (all.size() != 1 || !all.contains(extent)) {
-                log.error("Tablet " + extent + " overlaps previously assigned " + unopenedOverlapping
+ " " + openingOverlapping + " " + onlineOverlapping);
+              
+              // ignore any tablets that have recently split, for error logging
+              for (KeyExtent e2 : onlineOverlapping) {
+                Tablet tablet = onlineTablets.get(e2);
+                if (System.currentTimeMillis() - tablet.getSplitCreationTime() < RECENTLY_SPLIT_MILLIES)
{
+                  all.remove(e2);
+                }
+              }
+              
+              // ignore self, for error logging
+              all.remove(extent);
+              
+              if (all.size() > 0) {
+                log.error("Tablet " + extent + " overlaps previously assigned " + unopenedOverlapping
+ " " + openingOverlapping + " " + onlineOverlapping
+                    + " " + all);
               }
               return;
             }


Mime
View raw message