incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1196650 - /incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Date Wed, 02 Nov 2011 15:48:01 GMT
Author: ecn
Date: Wed Nov  2 15:48:01 2011
New Revision: 1196650

URL: http://svn.apache.org/viewvc?rev=1196650&view=rev
Log:
ACCUMULO-109: fix off-by-one error reading the max timestamp from the root tablet

Modified:
    incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1196650&r1=1196649&r2=1196650&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
(original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Wed Nov  2 15:48:01 2011
@@ -77,22 +77,22 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.iterators.IterationInterruptedException;
 import org.apache.accumulo.core.iterators.IteratorEnvironment;
 import org.apache.accumulo.core.iterators.IteratorUtil;
+import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
 import org.apache.accumulo.core.iterators.MultiIterator;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.SourceSwitchingIterator;
-import org.apache.accumulo.core.iterators.SystemScanIterator;
-import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
 import org.apache.accumulo.core.iterators.SourceSwitchingIterator.DataSource;
+import org.apache.accumulo.core.iterators.SystemScanIterator;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.core.security.thrift.AuthInfo;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.LocalityGroupUtil;
+import org.apache.accumulo.core.util.LocalityGroupUtil.LocalityGroupConfigurationError;
+import org.apache.accumulo.core.util.MetadataTable.DataFileValue;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.TabletOperations;
 import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.core.util.LocalityGroupUtil.LocalityGroupConfigurationError;
-import org.apache.accumulo.core.util.MetadataTable.DataFileValue;
 import org.apache.accumulo.core.zookeeper.ZooLock;
 import org.apache.accumulo.core.zookeeper.ZooSession;
 import org.apache.accumulo.server.constraints.ConstraintChecker;
@@ -1214,7 +1214,7 @@ public class Tablet {
     
     if (extent.equals(Constants.ROOT_TABLET_EXTENT)) {
       
-      long rtime = 0l;
+      long rtime = Long.MIN_VALUE;
       for (String path : datafiles.keySet()) {
         String filename = new Path(path).getName();
         
@@ -1232,8 +1232,10 @@ public class Tablet {
           reader.close();
         }
         
-        if (maxTime + 1 > rtime)
-          time = TabletTime.LOGICAL_TIME_ID + "" + (maxTime + 1);
+        if (maxTime > rtime) {
+          time = TabletTime.LOGICAL_TIME_ID + "" + maxTime;
+          rtime = maxTime;
+        }
       }
     }
     



Mime
View raw message