cockroachdb / pebble

RocksDB/LevelDB inspired key-value database in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

db: simplify upper synthetic boundary in level iterator

RaduBerinde opened this issue · comments

This issue tracks the work discussed in #3262, specifically this discussion: https://reviewable.io/reviews/cockroachdb/pebble/3262#-Npb_6vX-dru6Z2Z0Wdz

That PR simplified emitting the boundary at the lower limit. If we can make a similar change at the upper limit, we can remove MaybeFilteredKeys and related code.

@jbowens I tried a change similar to what I did on the lower bound and I made the level checker ignore boundary keys. I get this failure:

Init(0 /* dbs */, 51 /* batches */, 70 /* iters */, 51 /* snapshots */, 0 /* externalObjs */)
db1.RangeKeyUnset("k", "s", "@11")
db1.RangeKeySet("d", "j", "@12", "ozqtetiistfhzckitwu")
db1.Set("g", "fmcic")
db1.RangeKeyUnset("m", "q", "@9")
db1.Set("p", "ntq")
db1.Compact("c", "f", true /* parallelize */)
db1.DeleteRange("i", "s")
snap23 = db1.NewSnapshot("a", "b", "e", "h", "l", "n", "o", "r")
db1.Set("p", "jqo")
db1.Flush()
snap23.Get("p")   <-- returns "ntq" instead of "not found"

Link to the LSM here.

If you have any ideas of what else I can try, let me know. Otherwise, I'll close this and hopefully this all goes away when we reimplement the iterators.