Revision 2a0f3d0de12ddb0d538e2d221c682536acd885d1 authored by Aaron Gao on 21 February 2017, 18:11:04 UTC, committed by Facebook Github Bot on 21 February 2017, 18:24:17 UTC
Summary:
reimplement the compaction expansion on lower level.

Considering such a case:
input level file: 1[B E] 2[F G] 3[H I] 4 [J M]
output level file: 5[A C] 6[D K] 7[L O]

If we initially pick file 2, now we will compact file 2 and 6. But we can safely compact 2, 3 and 6 without expanding the output level.

The previous code is messy and wrong.

In this diff, I first determine the input range [a, b], and output range [c, d],
then we get the range [e,f] = [min(a, c), max(b, d] and put all eligible clean-cut files within [e, f] into this compaction.

**Note: clean-cut means the files don't have the same user key on the boundaries of some files that are not chosen in this compaction**.
Closes https://github.com/facebook/rocksdb/pull/1760

Differential Revision: D4395564

Pulled By: lightmark

fbshipit-source-id: 2dc2c5c
1 parent ebc8a79
History
File Mode Size
win
README -rw-r--r-- 405 bytes
dirent.h -rw-r--r-- 1.2 KB
likely.h -rw-r--r-- 788 bytes
port.h -rw-r--r-- 872 bytes
port_example.h -rw-r--r-- 3.7 KB
port_posix.cc -rw-r--r-- 4.7 KB
port_posix.h -rw-r--r-- 5.2 KB
stack_trace.cc -rw-r--r-- 3.5 KB
stack_trace.h -rw-r--r-- 686 bytes
sys_time.h -rw-r--r-- 1.3 KB
util_logger.h -rw-r--r-- 981 bytes
xpress.h -rw-r--r-- 725 bytes

README

back to top