]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
CompactionPicker
authorIgor Canadi <icanadi@fb.com>
Thu, 16 Jan 2014 21:03:52 +0000 (13:03 -0800)
committerIgor Canadi <icanadi@fb.com>
Thu, 16 Jan 2014 21:03:52 +0000 (13:03 -0800)
commitc699c84af47d454837b1e6e0aa64c55b69ee8ff4
tree5a32526affcb7fee8bd6866cd1fc0b8d4608e7d3
parenteae1804f29585cc643dee798a52d71569d1d90de
CompactionPicker

Summary:
This is a big one. This diff moves all the code related to picking compactions from VersionSet to new class CompactionPicker. Column families' compactions will be completely separate processes, so we need to have multiple CompactionPickers.

To make this easier to review, most of the code change is just copy/paste. There is also a small change not to use VersionSet::current_, but rather to take `Version* version` as a parameter. Most of the other code is exactly the same.

In future diffs, I will also make some improvements to CompactionPickers. I think the most important part will be encapsulating it better. Currently Version, VersionSet, Compaction and CompactionPicker are all friend classes, which makes it harder to change the implementation.

This diff depends on D15171, D15183, D15189 and D15201

Test Plan: `make check`

Reviewers: kailiu, sdong, dhruba, haobo

Reviewed By: kailiu

CC: leveldb
Differential Revision: https://reviews.facebook.net/D15207
db/compaction.h
db/compaction_picker.cc [new file with mode: 0644]
db/compaction_picker.h [new file with mode: 0644]
db/version_set.cc
db/version_set.h
db/version_set_reduce_num_levels.cc