Aaron Gao 2a0f3d0de1 level compaction expansion
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
2017-02-21 10:24:17 -08:00
..
2017-02-06 14:54:18 -08:00
2017-02-13 11:09:13 -08:00
2016-11-19 14:24:12 -08:00
2017-01-20 13:24:13 -08:00
2017-02-13 11:09:13 -08:00
2017-02-06 14:54:18 -08:00
2017-01-08 14:24:12 -08:00
2017-02-06 14:54:18 -08:00
2017-02-06 14:54:18 -08:00
2017-02-06 14:54:18 -08:00
2017-01-08 14:24:12 -08:00
2016-11-04 12:09:22 -07:00
2017-02-06 14:54:18 -08:00
2017-01-23 12:54:13 -08:00
2017-02-06 14:54:18 -08:00
2017-02-06 16:39:12 -08:00
2017-02-06 16:39:12 -08:00
2017-02-06 14:54:18 -08:00
2016-12-19 16:54:12 -08:00
2017-02-06 14:54:18 -08:00
2017-02-13 11:09:13 -08:00
2017-02-13 11:09:13 -08:00
2016-07-08 17:50:51 -07:00
2017-02-06 14:54:18 -08:00
2016-10-13 08:48:40 -07:00
2016-07-08 17:50:51 -07:00
2016-11-03 18:54:20 -07:00
2017-02-06 14:54:18 -08:00
2017-02-06 14:54:18 -08:00
2016-12-29 15:54:19 -08:00
2017-02-16 10:39:13 -08:00
2017-02-10 10:54:12 -08:00
2016-09-27 18:20:57 -07:00
2016-09-27 18:20:57 -07:00
2017-02-06 14:54:18 -08:00
2016-07-13 15:36:22 -07:00
2017-02-21 10:24:17 -08:00
2017-02-21 10:24:17 -08:00
2017-02-06 14:54:18 -08:00
2016-11-21 18:09:13 -08:00