1. 25 3月, 2016 1 次提交
    • Y
      Fix data race issue when sub-compaction is used in CompactionJob · be9816b3
      Yueh-Hsuan Chiang 提交于
      Summary:
      When subcompaction is used, all subcompactions share the same Compaction
      pointer in CompactionJob while each subcompaction all keeps their mutable
      stats in SubcompactionState.  However, there're still some mutable part
      that is currently store in the shared Compaction pointer.
      
      This patch makes two changes:
      
      1. Make the shared Compaction pointer const so that it can never be modified
         during the compaction.
      2. Move necessary states from Compaction to SubcompactionState.
      3. Make functions of Compaction const if the function does not modify
         its internal state.
      
      Test Plan: rocksdb and MyRocks test
      
      Reviewers: sdong, kradhakrishnan, andrewkr, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, yoshinorim, gunnarku, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55923
      be9816b3
  2. 24 3月, 2016 4 次提交
    • I
      Merge pull request #1050 from yuslepukhin/support_db_test2 · e3802531
      Islam AbdelRahman 提交于
      Add support for db_test2 for dev and CI runs
      e3802531
    • D
      Add support for db_test2 for dev and CI runs · e7cc49cb
      Dmitri Smirnov 提交于
      e7cc49cb
    • S
      Add comments to perf_context skip counters · 3996770d
      sdong 提交于
      Summary: Document the skipped counters in perf context more clearly.
      
      Test Plan: Comment only.
      
      Reviewers: IslamAbdelRahman, yhchiang, MarkCallaghan
      
      Reviewed By: MarkCallaghan
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55833
      3996770d
    • M
      Make WritableFileWrapper not screw up preallocation · 4e85b747
      Mike Kolupaev 提交于
      Summary:
      Without this diff, this is what happens to compaction output file if it's a subclass of WritableFileWrapper:
      - during compaction, all `PrepareWrite()` calls update `last_preallocated_block_` of the `WritableFileWrapper` itself, not of `target_`, since `PrepareWrite()` is not virtual,
      - `PrepareWrite()` calls `Allocate()`, which is virtual; it does `fallocate()` on `target_`,
      - after writing data, `target_->Close()` calls `GetPreallocationStatus()` of `target_`; it returns `last_preallocated_block_` of `target_`, which is zero because it was never touched before,
      - `target_->Close()` doesn't call `ftruncate()`; file remains big.
      
      This diff fixes it in a straightforward way, by making the methods virtual. `WritableFileWrapper` ends up having the useless fields `last_preallocated_block_` and `preallocation_block_size_`. I think ideally the preallocation logic should be outside `WritableFile`, the same way as `log_writer.h` and `file_reader_writer.h` moved some non-platform-specific logic out of Env, but that's probably not worth the effort now.
      
      Test Plan: `make -j check`; I'm going to deploy it on our test tier and see if it fixes space reclamation problem there
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, sdong
      
      Differential Revision: https://reviews.facebook.net/D54681
      4e85b747
  3. 23 3月, 2016 6 次提交
  4. 22 3月, 2016 3 次提交
  5. 19 3月, 2016 8 次提交
  6. 18 3月, 2016 7 次提交
    • M
      Reset block cache in failing unit test. · 44756260
      Marton Trencseni 提交于
      Test Plan: make -j40 check OPT=-g, on both /tmp and /dev/shm
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55701
      44756260
    • M
      Adding pin_l0_filter_and_index_blocks_in_cache feature. · 522de4f5
      Marton Trencseni 提交于
      Summary:
      When a block based table file is opened, if prefetch_index_and_filter is true, it will prefetch the index and filter blocks, putting them into the block cache.
      What this feature adds: when a L0 block based table file is opened, if pin_l0_filter_and_index_blocks_in_cache is true in the options (and prefetch_index_and_filter is true), then the filter and index blocks aren't released back to the block cache at the end of BlockBasedTableReader::Open(). Instead the table reader takes ownership of them, hence pinning them, ie. the LRU cache will never push them out. Meanwhile in the table reader, further accesses will not hit the block cache, thus avoiding lock contention.
      When the table reader is destroyed, it releases the pinned blocks (if there were any). This has to happen before the cache is destroyed, so I had to introduce a TableReader::Close(), to guarantee the order of destruction.
      
      Test Plan:
      Added two unit tests for this. Existing unit tests run fine (default is pin_l0_filter_and_index_blocks_in_cache=false).
      
      DISABLE_JEMALLOC=1 OPT=-g make all valgrind_check -j32
        Mac: OK.
        Linux: with D55287 patched in it's OK.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54801
      522de4f5
    • I
      Merge pull request #1041 from yuslepukhin/adjust_for_jemalloc · be222712
      Islam AbdelRahman 提交于
      Latest versions of Jemalloc library do not require je_init()/je_unint()
      be222712
    • S
      Fix in HistogramWindowingImpl · 4ecc03c0
      SherlockNoMad 提交于
      4ecc03c0
    • D
      Latest versions of Jemalloc library do not require je_init()/je_unint() · 2ca0994c
      Dmitri Smirnov 提交于
        calls. #ifdef in the source code and make this a default build option.
      2ca0994c
    • G
      Update --max_write_buffer_number for compaction benchmarks · 90aff0c4
      Gunnar Kudrjavets 提交于
      Summary: For compactions benchmarks (both level and universal) we'll use `--max_write_buffer_number=4`. For all the other benchmarks which don't customize the value of `--max_background_flushes` we'll continue using `--max_write_buffer_number=8`.
      
      Test Plan:
      To validate basic correctness and command-line options:
      
      ```
      cd ~/rocksdb
      NKEYS=10000000 ./tools/run_flash_bench.sh
      ```
      
      Reviewers: MarkCallaghan
      
      Reviewed By: MarkCallaghan
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55497
      90aff0c4
    • A
      Forge current file for checkpoint · 72224104
      Andrew Kryczka 提交于
      Summary:
      This fixes a similar issue as D54711: "CURRENT" file can mutate between
      GetLiveFiles() and copy to the tmp directory, in which case it would reference
      the wrong manifest filename. To fix this, I forge the "CURRENT" file such that
      it simply contains the filename for the manifest returned by GetLiveFiles().
      
      - Changed CreateCheckpoint() to forge current file
      - Added CreateFile() utility function
      - Added test case that rolls manifest during checkpoint creation
      
      Test Plan:
        $ ./checkpoint_test
      
      Reviewers: sdong, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55065
      72224104
  7. 17 3月, 2016 3 次提交
  8. 16 3月, 2016 8 次提交