HBASE-803 Atomic increment operations -- part 2 -- fix crash
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@758183 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5a84e853cf
commit
99d68d7d45
|
@ -105,6 +105,7 @@ Release 0.20.0 - Unreleased
|
|||
HBASE-1240 Would be nice if RowResult could be comparable
|
||||
(Erik Holstad via Stack)
|
||||
HBASE-803 Atomic increment operations (Ryan Rawson and Jon Gray via Stack)
|
||||
Part 1 and part 2 -- fix for a crash.
|
||||
HBASE-1252 Make atomic increment perform a binary increment
|
||||
(Jonathan Gray via Stack)
|
||||
HBASE-1258,1259 ganglia metrics for 'requests' is confusing
|
||||
|
@ -117,7 +118,6 @@ Release 0.20.0 - Unreleased
|
|||
(Nitay Joffe via Stack)
|
||||
|
||||
|
||||
|
||||
Release 0.19.0 - 01/21/2009
|
||||
INCOMPATIBLE CHANGES
|
||||
HBASE-885 TableMap and TableReduce should be interfaces
|
||||
|
|
|
@ -2613,23 +2613,20 @@ public class HRegion implements HConstants {
|
|||
} 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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue