You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2009/04/23 06:38:41 UTC

svn commit: r767790 - in /hadoop/hbase/branches/0.19: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Author: stack
Date: Thu Apr 23 04:38:41 2009
New Revision: 767790

URL: http://svn.apache.org/viewvc?rev=767790&view=rev
Log:
HBASE-1319 Bug in atomicIncrement 0.19.1 only

Modified:
    hadoop/hbase/branches/0.19/CHANGES.txt
    hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hadoop/hbase/branches/0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/CHANGES.txt?rev=767790&r1=767789&r2=767790&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.19/CHANGES.txt Thu Apr 23 04:38:41 2009
@@ -1,10 +1,11 @@
 HBase Change Log
 
-Unreleased changes
+Release 0.19.2 - Unreleased
   BUG FIXES
    HBASE-1303  Secondary index configuration prevents HBase from starting
                (Ken Weiner via Stack)
    HBASE-1202  getRow does not always work when specifying number of versions
+   HBASE-1319  Bug in atomicIncrement 0.19.1 only (Ryan Rawson via Stack)
 
 Release 0.19.1 - 03/19/2009
   BUG FIXES

Modified: hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=767790&r1=767789&r2=767790&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java Thu Apr 23 04:38:41 2009
@@ -2637,23 +2637,20 @@
       } finally {
         store.lock.readLock().unlock();
       }
-      if (c.size() == 1) {
+      // Pick the latest value out of List<Cell> c:
+      if (c.size() >= 1) {
         // Use the memcache timestamp value.
         LOG.debug("Overwriting the memcache value for " + Bytes.toString(row) + "/" + Bytes.toString(column));
         ts = c.get(0).getTimestamp();
         value = c.get(0).getValue();
-      } else if (c.size() > 1) {
-        throw new DoNotRetryIOException("more than 1 value returned in incrementColumnValue from memcache");
       }
 
       if (value == null) {
         // Check the store (including disk) for the previous value.
         Cell[] cell = store.get(hsk, 1);
-        if (cell != null && cell.length == 1) {
+        if (cell != null && cell.length >= 1) {
           LOG.debug("Using HFile previous value for " + Bytes.toString(row) + "/" + Bytes.toString(column));
           value = cell[0].getValue();
-        } else if (cell != null && c.size() > 1) {
-          throw new DoNotRetryIOException("more than 1 value returned in incrementColumnValue from Store");
         }
       }