• S
    Make CompactionPicker more easily tested · 76d1c28e
    sdong 提交于
    Summary:
    Make compaction picker easier to test.
    The basic idea is to separate a minimum subcomponent of Version to VersionStorageInfo, which just responsible to LSM tree. A stub VersionStorageInfo can then be easily created and passed into compaction picker so that we can check the outputs.
    
    It now passes most tests. Still two things need to be done:
    (1) deal with the FIFO compaction's file size.
    (2) write an example test to make sure the interface can do the job.
    
    Add a compaction_picker_test to make sure compaction picker codes can be easily unit tested.
    
    Test Plan:
    Pass all unit tests and compaction_picker_test
    
    Reviewers: yhchiang, rven, igor, ljin
    
    Reviewed By: ljin
    
    Subscribers: leveldb, dhruba
    
    Differential Revision: https://reviews.facebook.net/D27639
    76d1c28e
db_impl_debug.cc 4.8 KB