HBASE-5523 Fix Delete Timerange logic for KEEP_DELETED_CELLS

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1297343 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
larsh 2012-03-06 06:17:11 +00:00
parent 88115f3d8b
commit 723e8559e3
3 changed files with 11 additions and 12 deletions

View File

@ -281,8 +281,7 @@ public class ScanQueryMatcher {
// first ignore delete markers if the scanner can do so, and the
// range does not include the marker
boolean includeDeleteMarker = seePastDeleteMarkers ?
// +1, to allow a range between a delete and put of same TS
tr.withinTimeRange(timestamp+1) :
tr.withinTimeRange(timestamp) :
tr.withinOrAfterTimeRange(timestamp);
if (includeDeleteMarker) {
this.deletes.add(bytes, offset, qualLength, timestamp, type);

View File

@ -178,7 +178,7 @@ public class TestFromClientSide {
p.add(FAMILY, C0, T3);
h.put(p);
Delete d = new Delete(T1, ts+2, null);
Delete d = new Delete(T1, ts+3, null);
h.delete(d);
d = new Delete(T1, ts+3, null);

View File

@ -447,16 +447,16 @@ public class TestKeepDeletes extends HBaseTestCase {
p.add(c1, c1, T2);
region.put(p);
Delete d = new Delete(T1, ts+1, null);
d.deleteColumns(c0, c0, ts+1);
Delete d = new Delete(T1, ts+2, null);
d.deleteColumns(c0, c0, ts+2);
region.delete(d, null, true);
d = new Delete(T1, ts+1, null);
d.deleteFamily(c1, ts+1);
d = new Delete(T1, ts+2, null);
d.deleteFamily(c1, ts+2);
region.delete(d, null, true);
d = new Delete(T2, ts+1, null);
d.deleteFamily(c0, ts+1);
d = new Delete(T2, ts+2, null);
d.deleteFamily(c0, ts+2);
region.delete(d, null, true);
// add an older delete, to make sure it is filtered
@ -464,7 +464,7 @@ public class TestKeepDeletes extends HBaseTestCase {
d.deleteFamily(c1, ts-10);
region.delete(d, null, true);
// ts + 2 does NOT include the delete at ts+1
// ts + 2 does NOT include the delete at ts+2
checkGet(region, T1, c0, c0, ts+2, T2, T1);
checkGet(region, T1, c0, c1, ts+2, T2, T1);
checkGet(region, T1, c1, c0, ts+2, T2, T1);
@ -610,10 +610,10 @@ public class TestKeepDeletes extends HBaseTestCase {
region.put(p);
// family markers are each family
Delete d = new Delete(T1, ts, null);
Delete d = new Delete(T1, ts+1, null);
region.delete(d, null, true);
d = new Delete(T2, ts+1, null);
d = new Delete(T2, ts+2, null);
region.delete(d, null, true);
Scan s = new Scan(T1);