Fix rocksdb prefix Seek performance.#4319
Conversation
|
This will probably need a quick rebase since #4308 merged Review status: 0 of 11 files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from the review on Reviewable.io |
storage/engine/rocksdb/db.cc
Outdated
| // When we're performing a prefix scan, we want to limit the scan | ||
| // to the keys that have the matching prefix. Prefix in this case | ||
| // refers to an exact match on the non-timestamp portion of a | ||
| // key. We do this be constructing an encoded mvcc key which has a |
fd06855 to
e9c64c5
Compare
|
This PR also has a big impact on the |
Set ReadOptions.iterate_upper_bound when creating "prefix" iterators. This avoids pathological performance when seeking into a rocksdb MemTable which contains large expanses of deletion tombstones. Added a benchmark which demonstrates the pathological performance of the old code. name old time/op new time/op delta MVCCPutDelete-8 185µs ± 8% 11µs ± 3% -94.11% (p=0.000 n=10+10) Fixes cockroachdb#4196.
e9c64c5 to
20cb646
Compare
|
Not sure what is up with the circleci failure. I did notice that an unrelated changed had snuck into my Anyone want to stamp this with an LGTM? |
|
LGTM. I hope you've seen Igor's comment which was on a commit that you've since replaced. |
|
Reviewed 4 of 11 files at r1, 6 of 7 files at r2, 1 of 1 files at r3. storage/engine/rocksdb_test.go, line 614 [r1] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 1 unresolved discussion. storage/engine/rocksdb_test.go, line 614 [r1] (raw file): Comments from the review on Reviewable.io |
Fix rocksdb prefix Seek performance.
|
Gotcha. I may rest in piece. Thanks for looking. On Thu, Feb 11, 2016 at 1:57 PM Peter Mattis notifications@github.com
|
|
The unrelated |
|
See robfig/glock#29 |
Set ReadOptions.iterate_upper_bound when creating "prefix"
iterators. This avoids pathological performance when seeking into a
rocksdb MemTable which contains large expanses of deletion tombstones.
Added a benchmark which demonstrates the pathological performance of the
old code.
Fixes #4196.