• I
    Allowing L0 -> L1 trivial move on sorted data · 3ce3bb3d
    Islam AbdelRahman 提交于
    Summary:
    This diff updates the logic of how we do trivial move, now trivial move can run on any number of files in input level as long as they are not overlapping
    
    The conditions for trivial move have been updated
    
    Introduced conditions:
      - Trivial move cannot happen if we have a compaction filter (except if the compaction is not manual)
      - Input level files cannot be overlapping
    
    Removed conditions:
      - Trivial move only run when the compaction is not manual
      - Input level should can contain only 1 file
    
    More context on what tests failed because of Trivial move
    ```
    DBTest.CompactionsGenerateMultipleFiles
    This test is expecting compaction on a file in L0 to generate multiple files in L1, this test will fail with trivial move because we end up with one file in L1
    ```
    
    ```
    DBTest.NoSpaceCompactRange
    This test expect compaction to fail when we force environment to report running out of space, of course this is not valid in trivial move situation
    because trivial move does not need any extra space, and did not check for that
    ```
    
    ```
    DBTest.DropWrites
    Similar to DBTest.NoSpaceCompactRange
    ```
    
    ```
    DBTest.DeleteObsoleteFilesPendingOutputs
    This test expect that a file in L2 is deleted after it's moved to L3, this is not valid with trivial move because although the file was moved it is now used by L3
    ```
    
    ```
    CuckooTableDBTest.CompactionIntoMultipleFiles
    Same as DBTest.CompactionsGenerateMultipleFiles
    ```
    
    This diff is based on a work by @sdong https://reviews.facebook.net/D34149
    
    Test Plan: make -j64 check
    
    Reviewers: rven, sdong, igor
    
    Reviewed By: igor
    
    Subscribers: yhchiang, ott, march, dhruba, sdong
    
    Differential Revision: https://reviews.facebook.net/D34797
    3ce3bb3d
db_impl.h 30.5 KB