| Extracts the largest file b1 from
| |compaction_files| and then searches for a b2
| in |level_files| for which user_key(u1)
| = user_key(l2). If it finds such a file b2
| (known as a boundary file) it adds it to
| |compaction_files| and then searches again
| using this new upper bound.
|
| If there are two blocks, b1=(l1, u1) and
| b2=(l2, u2) and user_key(u1) = user_key(l2),
| and if we compact b1 but not b2 then
| a subsequent get operation will yield an
| incorrect result because it will return the
| record from b2 in level i rather than from b1
| because it searches level by level for records
| matching the supplied user key.
|
| parameters:
|
| in level_files: List of files to
| search for boundary files.
|
| in/out compaction_files: List of files to
| extend by adding boundary files.
| Maximum number of bytes in all compacted files.
| We avoid expanding the lower level file set of
| a compaction if it would make the total
| compaction cover more than this many bytes.
| Return the smallest index i such that
| files[i]->largest >= key.
|
| Return files.size() if there is no such file.
|
| REQUIRES: “files” contains a sorted list of
| non-overlapping files.
| Returns true iff some file in “files” overlaps
| the user key range [*smallest,*largest].
|
| smallest==nullptr represents a key smaller than
| all keys in the DB.
|
| largest==nullptr represents a key largest than
| all keys in the DB.
|
| REQUIRES: If disjoint_sorted_files, files[]
| contains disjoint ranges in sorted
| order.