Revision 2014cdf2d0792236ae22b94cf862c6ca537e2903 authored by Aaron Gao on 05 May 2017, 22:01:04 UTC, committed by Aaron Gao on 10 May 2017, 21:06:33 UTC
Summary:
Now if we have iterate_upper_bound set, we continue read until get a key >= upper_bound. For a lot of cases that neighboring data blocks have a user key gap between them, our index key will be a user key in the middle to get a shorter size. For example, if we have blocks:
[a b c d][f g h]
Then the index key for the first block will be 'e'.
then if upper bound is any key between 'd' and 'e', for example, d1, d2, ..., d99999999999, we don't have to read the second block and also know that we have done our iteration by reaching the last key that smaller the upper bound already.

This diff can reduce RA in most cases.
Closes https://github.com/facebook/rocksdb/pull/2239

Differential Revision: D4990693

Pulled By: lightmark

fbshipit-source-id: ab30ea2e3c6edf3fddd5efed3c34fcf7739827ff
1 parent 459e00b
History
File Mode Size
.gitignore -rw-r--r-- 176 bytes
Makefile -rw-r--r-- 2.2 KB
README.md -rw-r--r-- 120 bytes
c_simple_example.c -rw-r--r-- 2.6 KB
column_families_example.cc -rw-r--r-- 2.0 KB
compact_files_example.cc -rw-r--r-- 5.7 KB
compaction_filter_example.cc -rw-r--r-- 2.8 KB
optimistic_transaction_example.cc -rw-r--r-- 4.1 KB
options_file_example.cc -rw-r--r-- 4.0 KB
rocksdb_option_file_example.ini -rw-r--r-- 4.5 KB
simple_example.cc -rw-r--r-- 1.4 KB
transaction_example.cc -rw-r--r-- 4.2 KB

README.md

back to top