build
a.SET.1:A
b.SINGLEDEL.4:
b.SET.2:B
c.DEL.5:
c.SET.3:C
d.SET.4:D4
d.SET.2:D2
----

iter
first
next
next
next
next
next
next
next
prev
prev
prev
prev
prev
prev
prev
prev
----
first: <a:1>:A
 next: <b:4>:
 next: <b:2>:B
 next: <c:5>:
 next: <c:3>:C
 next: <d:4>:D4
 next: <d:2>:D2
 next: .
 prev: <d:2>:D2
 prev: <d:4>:D4
 prev: <c:3>:C
 prev: <c:5>:
 prev: <b:2>:B
 prev: <b:4>:
 prev: <a:1>:A
 prev: .

iter hide-obsolete-points=true
first
next
next
next
next
prev
prev
prev
prev
prev
----
first: <a:1>:A
 next: <b:4>:
 next: <c:5>:
 next: <d:4>:D4
 next: .
 prev: <d:4>:D4
 prev: <c:5>:
 prev: <b:4>:
 prev: <a:1>:A
 prev: .

iter hide-obsolete-points=true
seek-ge c
prev
prev
next
next
next
seek-lt c
next
prev
prev
----
seek-ge c: <c:5>:
     prev: <b:4>:
     prev: <a:1>:A
     next: <b:4>:
     next: <c:5>:
     next: <d:4>:D4
seek-lt c: <b:4>:
     next: <c:5>:
     prev: <b:4>:
     prev: <a:1>:A

build
a.SET.3:A
a.MERGE.2:A2
b.MERGE.20:B20
b.MERGE.18:B18
b.SET.16:B16
b.SET.14:B14
c.MERGE.30:C30
c.MERGE.28:C28
c.DEL.26:
----

iter
first
next
next
next
next
next
next
next
----
first: <a:3>:A
 next: <a:2>:A2
 next: <b:20>:B20
 next: <b:18>:B18
 next: <b:16>:B16
 next: <b:14>:B14
 next: <c:30>:C30
 next: <c:28>:C28

iter hide-obsolete-points=true
first
next
next
next
next
next
next
last
prev
prev
prev
prev
prev
prev
----
first: <a:3>:A
 next: <b:20>:B20
 next: <b:18>:B18
 next: <b:16>:B16
 next: <c:30>:C30
 next: <c:28>:C28
 next: <c:26>:
 last: <c:26>:
 prev: <c:28>:C28
 prev: <c:30>:C30
 prev: <b:16>:B16
 prev: <b:18>:B18
 prev: <b:20>:B20
 prev: <a:3>:A

build
b.MERGE.20:B20
b.SETWITHDEL.16:B16
b.SETWITHDEL.14:B14
c.MERGE.30:C30
c.DELSIZED.28:
c.DEL.26:
----

iter
first
next
next
next
next
next
next
----
first: <b:20>:B20
 next: <b:16>:B16
 next: <b:14>:B14
 next: <c:30>:C30
 next: <c:28>:
 next: <c:26>:
 next: .

iter hide-obsolete-points=true
first
next
next
next
next
----
first: <b:20>:B20
 next: <b:16>:B16
 next: <c:30>:C30
 next: <c:28>:
 next: .

build
b.SETWITHDEL.20:B20
b.MERGE.16:B16
b.MERGE.14:B14
b.SET.12:B12
----

iter
first
next
next
next
next
----
first: <b:20>:B20
 next: <b:16>:B16
 next: <b:14>:B14
 next: <b:12>:B12
 next: .

iter hide-obsolete-points=true
first
next
----
first: <b:20>:B20
 next: .

build writing-to-lowest-level
a.SET.10:A10
b.DEL.20:
b.MERGE.16:B16
b.MERGE.14:B14
b.SET.12:B12
----

iter
first
next
next
next
next
next
----
first: <a:10>:A10
 next: <b:20>:
 next: <b:16>:B16
 next: <b:14>:B14
 next: <b:12>:B12
 next: .

iter hide-obsolete-points=true
first
next
----
first: <a:10>:A10
 next: .

build writing-to-lowest-level
a.SET.10:A10
b.DEL.16:B16
b.SETWITHDEL.14:B14
c.DELSIZED.30:
c.SET.28:C28
d.SINGLEDEL.40:
d.MERGE.30:D30
----

iter
first
next
next
next
next
next
next
next
----
first: <a:10>:A10
 next: <b:16>:B16
 next: <b:14>:B14
 next: <c:30>:
 next: <c:28>:C28
 next: <d:40>:
 next: <d:30>:D30
 next: .

iter hide-obsolete-points=true
first
next
----
first: <a:10>:A10
 next: .

build writing-to-lowest-level
force-obsolete: a.SET.1:A
force-obsolete: b.SINGLEDEL.4:
force-obsolete: b.SET.2:B
c.DEL.5:
force-obsolete: d.SET.10:D10
----

iter
first
next
next
next
next
next
----
first: <a:1>:A
 next: <b:4>:
 next: <b:2>:B
 next: <c:5>:
 next: <d:10>:D10
 next: .

iter hide-obsolete-points=true
first
----
table does not intersect BlockPropertyFilter

build is-strict-obsolete
d.SINGLEDEL.40:
d.MERGE.30:D30
----
failed to write d#30,MERGE = D30: MERGE not supported in a strict-obsolete sstable

# Regression test for #3761. If an entire block contains obsolete points,
# skipBackward should still skip to blocks earlier in the sstable.

build writing-to-lowest-level
a.SET.10:A10
force-obsolete: b.DEL.5:
force-obsolete: b.SETWITHDEL.2:foo
force-obsolete: c.DEL.0:
force-obsolete: cc.DEL.5:
----

iter hide-obsolete-points-without-filter=true
last
----
last: <a:10>:A10

iter hide-obsolete-points-without-filter=true
seek-lt d
----
seek-lt d: <a:10>:A10

iter hide-obsolete-points-without-filter=true
seek-lt c
----
seek-lt c: <a:10>:A10
