HBASE-4118 method regionserver.MemStore#updateColumnValue: the check for
qualifier and family is missing (N Keywal via Ted Yu) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1148965 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
399462d5d7
commit
5db7f2f127
|
@ -166,6 +166,8 @@ Release 0.91.0 - Unreleased
|
|||
HBASE-4112 Creating table may throw NullPointerException (Jinchao via Ted Yu)
|
||||
HBASE-4093 When verifyAndAssignRoot throws exception, the deadServers state
|
||||
cannot be changed (fulin wang via Ted Yu)
|
||||
HBASE-4118 method regionserver.MemStore#updateColumnValue: the check for
|
||||
qualifier and family is missing (N Keywal via Ted Yu)
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
||||
|
|
|
@ -458,25 +458,22 @@ public class MemStore implements HeapSize {
|
|||
KeyValue kv = it.next();
|
||||
|
||||
// if this isnt the row we are interested in, then bail:
|
||||
if (!firstKv.matchingColumn(family,qualifier) || !firstKv.matchingRow(kv) ) {
|
||||
if (!kv.matchingColumn(family,qualifier) || !kv.matchingRow(firstKv) ) {
|
||||
break; // rows dont match, bail.
|
||||
}
|
||||
|
||||
// if the qualifier matches and it's a put, just RM it out of the kvset.
|
||||
if (firstKv.matchingQualifier(kv)) {
|
||||
// to be extra safe we only remove Puts that have a memstoreTS==0
|
||||
if (kv.getType() == KeyValue.Type.Put.getCode()) {
|
||||
now = Math.max(now, kv.getTimestamp());
|
||||
}
|
||||
if (kv.getType() == KeyValue.Type.Put.getCode() &&
|
||||
kv.getTimestamp() > now && firstKv.matchingQualifier(kv)) {
|
||||
now = kv.getTimestamp();
|
||||
}
|
||||
}
|
||||
|
||||
// create or update (upsert) a new KeyValue with
|
||||
// 'now' and a 0 memstoreTS == immediately visible
|
||||
return upsert(Arrays.asList(new KeyValue [] {
|
||||
new KeyValue(row, family, qualifier, now,
|
||||
Bytes.toBytes(newValue))
|
||||
}));
|
||||
return upsert(Arrays.asList(
|
||||
new KeyValue(row, family, qualifier, now, Bytes.toBytes(newValue)))
|
||||
);
|
||||
} finally {
|
||||
this.lock.readLock().unlock();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue