1. 18 3月, 2016 5 次提交
    • 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
    • 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
  2. 17 3月, 2016 3 次提交
  3. 16 3月, 2016 8 次提交
  4. 15 3月, 2016 6 次提交
  5. 13 3月, 2016 2 次提交
    • A
      Update change log for 4.6 release · 0267655d
      Andrew Kryczka 提交于
      Summary: as titled
      
      Test Plan: N/A
      
      Reviewers: sdong, kradhakrishnan, anthony, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55323
      0267655d
    • A
      Expose RepairDB as ldb command · 08304c08
      Andrew Kryczka 提交于
      Summary: This will make it easier for admins and devs to use RepairDB.
      
      Test Plan:
      Tried deleting the manifest and verified it recovers:
      
        $ ldb --create_if_missing --db=/tmp/test_db put ok ok
        $ rm -f /tmp/test_db/MANIFEST-000001
        $ ./ldb --db=/tmp/test_db repair
        $ ldb --db=/tmp/test_db get ok
        ok
      
      Reviewers: yhchiang, sdong, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55359
      08304c08
  6. 12 3月, 2016 5 次提交
    • S
      Fix Build Error · fd664a27
      SherlockNoMad 提交于
      fd664a27
    • I
      Aggregate hot Iterator counters in LocalStatistics (DBIter::Next perf regression) · 580fede3
      Islam AbdelRahman 提交于
      Summary:
      This patch bump the counters in the frequent code path DBIter::Next() / DBIter::Prev() in a local data members and send them to Statistics when the iterator is destroyed
      A better solution will be to have thread_local implementation for Statistics
      
      New performance
      ```
      readseq      :       0.035 micros/op 28597881 ops/sec; 3163.7 MB/s
           1,851,568,819      stalled-cycles-frontend   #   31.29% frontend cycles idle    [49.86%]
             884,929,823      stalled-cycles-backend    #   14.95% backend  cycles idle    [50.21%]
      readreverse  :       0.071 micros/op 14077393 ops/sec; 1557.3 MB/s
           3,239,575,993      stalled-cycles-frontend   #   27.36% frontend cycles idle    [49.96%]
           1,558,253,983      stalled-cycles-backend    #   13.16% backend  cycles idle    [50.14%]
      
      ```
      
      Existing performance
      
      ```
      readreverse  :       0.174 micros/op 5732342 ops/sec;  634.1 MB/s
          20,570,209,389      stalled-cycles-frontend   #   70.71% frontend cycles idle    [50.01%]
          18,422,816,837      stalled-cycles-backend    #   63.33% backend  cycles idle    [50.04%]
      
      readseq      :       0.119 micros/op 8400537 ops/sec;  929.3 MB/s
          15,634,225,844      stalled-cycles-frontend   #   79.07% frontend cycles idle    [49.96%]
          14,227,427,453      stalled-cycles-backend    #   71.95% backend  cycles idle    [50.09%]
      ```
      
      Test Plan: unit tests
      
      Reviewers: yhchiang, sdong, igor
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55107
      580fede3
    • S
      54f6b9e1
    • A
      Add multithreaded transaction test · 79025280
      agiardullo 提交于
      Summary: Refactored db_bench transaction stress tests so that they can be called from unit tests as well.
      
      Test Plan: run new unit test as well as db_bench
      
      Reviewers: yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55203
      79025280
    • B
      fix: handle_fatal_signal (sig=6) in std::vector<std::string,... · e8e6cf01
      Baris Yazici 提交于
      fix: handle_fatal_signal (sig=6) in std::vector<std::string, std::allocator<std::string> >::_M_range_check | c++/4.8.2/bits/stl_vector.h:794 #174
      
      Summary:
      Fix for https://github.com/facebook/mysql-5.6/issues/174
      
      When there is no old files to purge, vector.at(i) function was crashing
      
      if (old_info_log_file_count != 0 &&
            old_info_log_file_count >= db_options_.keep_log_file_num) {
          std::sort(old_info_log_files.begin(), old_info_log_files.end());
          size_t end = old_info_log_file_count - db_options_.keep_log_file_num;
          for (unsigned int i = 0; i <= end; i++) {
            std::string& to_delete = old_info_log_files.at(i);
      
      Added check to old_info_log_file_count be non zero.
      
      Test Plan: run existing tests
      
      Reviewers: gunnarku, vasilep, sdong, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: andrewkr, webscalesql-eng, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55245
      e8e6cf01
  7. 11 3月, 2016 5 次提交
    • A
      Cleanup stale manifests outside of full purge · d9620239
      Andrew Kryczka 提交于
      Summary:
      - Keep track of obsolete manifests in VersionSet
      - Updated FindObsoleteFiles() to put obsolete manifests in the JobContext for later use by PurgeObsoleteFiles()
      - Added test case that verifies a stale manifest is deleted by a non-full purge
      
      Test Plan:
        $ ./backupable_db_test --gtest_filter=BackupableDBTest.ChangeManifestDuringBackupCreation
      
      Reviewers: IslamAbdelRahman, yoshinorim, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55269
      d9620239
    • Y
      Cache to have an option to fail Cache::Insert() when full · f71fc77b
      Yi Wu 提交于
      Summary:
      Cache to have an option to fail Cache::Insert() when full. Update call sites to check status and handle error.
      
      I totally have no idea what's correct behavior of all the call sites when they encounter error. Please let me know if you see something wrong or more unit test is needed.
      
      Test Plan: make check -j32, see tests pass.
      
      Reviewers: anthony, yhchiang, andrewkr, IslamAbdelRahman, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D54705
      f71fc77b
    • I
      Merge pull request #938 from alexander-fenster/master · ee8cc352
      Igor Canadi 提交于
      added --no_value option to ldb scan to dump key only
      ee8cc352
    • Y
      Update compaction score right after CompactFiles forms a compaction · 765597fa
      Yueh-Hsuan Chiang 提交于
      Summary:
      This is a follow-up patch of https://reviews.facebook.net/D54891.
      As the information about files being compacted will also be used
      when making compaction decision, it is necessary to update the compaction
      score when a compaction plan has been made but not yet execute.
      
      This patch adds a missing call to update the compaction score in
      CompactFiles().
      
      Test Plan: compact_files_test
      
      Reviewers: sdong, IslamAbdelRahman, kradhakrishnan, yiwu, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55227
      765597fa
    • A
      formatting fix · f0161c37
      Alexander Fenster 提交于
      f0161c37
  8. 09 3月, 2016 1 次提交
  9. 08 3月, 2016 4 次提交
  10. 05 3月, 2016 1 次提交
    • S
      Change Property name from "rocksdb.current_version_number" to... · 294bdf9e
      sdong 提交于
      Change Property name from "rocksdb.current_version_number" to "rocksdb.current-super-version-number"
      
      Summary: I realized I again is wrong about the naming convention. Let me change it to the correct one.
      
      Test Plan: Run unit tests.
      
      Reviewers: IslamAbdelRahman, kradhakrishnan, yhchiang, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55041
      294bdf9e