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:
parent
88115f3d8b
commit
723e8559e3
|
@ -281,8 +281,7 @@ public class ScanQueryMatcher {
|
||||||
// first ignore delete markers if the scanner can do so, and the
|
// first ignore delete markers if the scanner can do so, and the
|
||||||
// range does not include the marker
|
// range does not include the marker
|
||||||
boolean includeDeleteMarker = seePastDeleteMarkers ?
|
boolean includeDeleteMarker = seePastDeleteMarkers ?
|
||||||
// +1, to allow a range between a delete and put of same TS
|
tr.withinTimeRange(timestamp) :
|
||||||
tr.withinTimeRange(timestamp+1) :
|
|
||||||
tr.withinOrAfterTimeRange(timestamp);
|
tr.withinOrAfterTimeRange(timestamp);
|
||||||
if (includeDeleteMarker) {
|
if (includeDeleteMarker) {
|
||||||
this.deletes.add(bytes, offset, qualLength, timestamp, type);
|
this.deletes.add(bytes, offset, qualLength, timestamp, type);
|
||||||
|
|
|
@ -178,7 +178,7 @@ public class TestFromClientSide {
|
||||||
p.add(FAMILY, C0, T3);
|
p.add(FAMILY, C0, T3);
|
||||||
h.put(p);
|
h.put(p);
|
||||||
|
|
||||||
Delete d = new Delete(T1, ts+2, null);
|
Delete d = new Delete(T1, ts+3, null);
|
||||||
h.delete(d);
|
h.delete(d);
|
||||||
|
|
||||||
d = new Delete(T1, ts+3, null);
|
d = new Delete(T1, ts+3, null);
|
||||||
|
|
|
@ -447,16 +447,16 @@ public class TestKeepDeletes extends HBaseTestCase {
|
||||||
p.add(c1, c1, T2);
|
p.add(c1, c1, T2);
|
||||||
region.put(p);
|
region.put(p);
|
||||||
|
|
||||||
Delete d = new Delete(T1, ts+1, null);
|
Delete d = new Delete(T1, ts+2, null);
|
||||||
d.deleteColumns(c0, c0, ts+1);
|
d.deleteColumns(c0, c0, ts+2);
|
||||||
region.delete(d, null, true);
|
region.delete(d, null, true);
|
||||||
|
|
||||||
d = new Delete(T1, ts+1, null);
|
d = new Delete(T1, ts+2, null);
|
||||||
d.deleteFamily(c1, ts+1);
|
d.deleteFamily(c1, ts+2);
|
||||||
region.delete(d, null, true);
|
region.delete(d, null, true);
|
||||||
|
|
||||||
d = new Delete(T2, ts+1, null);
|
d = new Delete(T2, ts+2, null);
|
||||||
d.deleteFamily(c0, ts+1);
|
d.deleteFamily(c0, ts+2);
|
||||||
region.delete(d, null, true);
|
region.delete(d, null, true);
|
||||||
|
|
||||||
// add an older delete, to make sure it is filtered
|
// add an older delete, to make sure it is filtered
|
||||||
|
@ -464,7 +464,7 @@ public class TestKeepDeletes extends HBaseTestCase {
|
||||||
d.deleteFamily(c1, ts-10);
|
d.deleteFamily(c1, ts-10);
|
||||||
region.delete(d, null, true);
|
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, c0, ts+2, T2, T1);
|
||||||
checkGet(region, T1, c0, c1, ts+2, T2, T1);
|
checkGet(region, T1, c0, c1, ts+2, T2, T1);
|
||||||
checkGet(region, T1, c1, c0, 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);
|
region.put(p);
|
||||||
|
|
||||||
// family markers are each family
|
// 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);
|
region.delete(d, null, true);
|
||||||
|
|
||||||
d = new Delete(T2, ts+1, null);
|
d = new Delete(T2, ts+2, null);
|
||||||
region.delete(d, null, true);
|
region.delete(d, null, true);
|
||||||
|
|
||||||
Scan s = new Scan(T1);
|
Scan s = new Scan(T1);
|
||||||
|
|
Loading…
Reference in New Issue