HBASE-808,809 MAX_VERSIONS not respected, and Deletall doesn't and inserts; fix misapplication of patch
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@685458 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
78b53558b8
commit
aabc02c44b
|
@ -548,20 +548,6 @@ class Memcache {
|
|||
final long now) {
|
||||
ArrayList<Cell> result = new ArrayList<Cell>();
|
||||
List<HStoreKey> victims = new ArrayList<HStoreKey>();
|
||||
// Handle special case where only one version wanted.
|
||||
if (numVersions == 1) {
|
||||
byte [] value = map.get(key);
|
||||
if (!isDeleted(value)) {
|
||||
// Filter out expired results
|
||||
if (HStore.notExpiredAndNotInDeletes(ttl, key, now, deletes)) {
|
||||
result.add(new Cell(value, key.getTimestamp()));
|
||||
} else {
|
||||
addVictim(victims, key);
|
||||
}
|
||||
} else {
|
||||
deletes.add(key);
|
||||
}
|
||||
} else {
|
||||
SortedMap<HStoreKey, byte[]> tailMap = map.tailMap(key);
|
||||
for (Map.Entry<HStoreKey, byte[]> es : tailMap.entrySet()) {
|
||||
HStoreKey itKey = es.getKey();
|
||||
|
@ -585,7 +571,6 @@ class Memcache {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Remove expired victims from the map.
|
||||
for (HStoreKey v: victims) {
|
||||
map.remove(v);
|
||||
|
|
Loading…
Reference in New Issue