1. 02 9月, 2016 1 次提交
    • S
      Merge options source_compaction_factor, max_grandparent_overlap_bytes and... · 32149059
      sdong 提交于
      Merge options source_compaction_factor, max_grandparent_overlap_bytes and expanded_compaction_factor into max_compaction_bytes
      
      Summary: To reduce number of options, merge source_compaction_factor, max_grandparent_overlap_bytes and expanded_compaction_factor into max_compaction_bytes.
      
      Test Plan: Add two new unit tests. Run all existing tests, including jtest.
      
      Reviewers: yhchiang, igor, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59829
      32149059
  2. 27 8月, 2016 1 次提交
  3. 20 8月, 2016 1 次提交
    • Y
      Introduce ClockCache · 4cc37f59
      Yi Wu 提交于
      Summary:
      Clock-based cache implemenetation aim to have better concurreny than
      default LRU cache. See inline comments for implementation details.
      
      Test Plan:
      Update cache_test to run on both LRUCache and ClockCache. Adding some
      new tests to catch some of the bugs that I fixed while implementing the
      cache.
      
      Reviewers: kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61647
      4cc37f59
  4. 11 8月, 2016 1 次提交
    • S
      Change HISTORY.md for release 4.11 · 638c49f2
      sdong 提交于
      Summary:
      Need to change HISTORY.md for 4.11.
      4.10 was not updated either. Update it together.
      
      Test Plan: Not needed.
      
      Reviewers: kradhakrishnan, andrewkr, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D61665
      638c49f2
  5. 10 8月, 2016 2 次提交
  6. 06 8月, 2016 1 次提交
  7. 27 7月, 2016 1 次提交
    • S
      Change options memtable_prefix_bloom_huge_page_tlb_size =>... · e5b5f12b
      sdong 提交于
      Change options memtable_prefix_bloom_huge_page_tlb_size => memtable_huge_page_size and cover huge page to memtable too
      
      Summary: Extend the option memtable_prefix_bloom_huge_page_tlb_size from just putting memtable bloom filter to huge page to memtable itself too.
      
      Test Plan: Run all existing tests.
      
      Reviewers: IslamAbdelRahman, yhchiang, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D60513
      e5b5f12b
  8. 06 7月, 2016 1 次提交
  9. 05 7月, 2016 1 次提交
  10. 02 7月, 2016 1 次提交
    • I
      Add More Logging to track total_log_size · 9b5adea9
      Islam AbdelRahman 提交于
      Summary: We saw instances where total_log_size is off the real value, but I'm not able to reproduce it. Add more logging to help debugging when it happens again.
      
      Test Plan: Run the unit test and see the logging.
      
      Reviewers: andrewkr, yhchiang, igor, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D60081
      9b5adea9
  11. 25 6月, 2016 1 次提交
    • A
      Detect column family from properties [CF + RepairDB part 2/3] · 56ac6862
      Andrew Kryczka 提交于
      Summary:
      This diff uses the CF ID and CF name properties in the SST file
      to associate recovered data with the proper column family. Depends on D59775.
      
      - In ScanTable(), create column families in VersionSet each time a new one is discovered (via reading SST file properties)
      - In ConvertLogToTable(), dump an SST file for every column family with data in the WAL
      - In AddTables(), make a VersionEdit per-column family that adds all of that CF's tables
      
      Test Plan:
        $ ./repair_test
      
      Reviewers: yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D59781
      56ac6862
  12. 22 6月, 2016 1 次提交
    • O
      Add a read option to enable background purge when cleaning up iterators · c4e19b77
      omegaga 提交于
      Summary:
      Add a read option `background_purge_on_iterator_cleanup` to avoid deleting files in foreground when destroying iterators.
      Instead, a job is scheduled in high priority queue and would be executed in a separate background thread.
      
      Test Plan: Add a variant of PurgeObsoleteFileTest. Turn on background purge option in the new test, and use sleeping task to ensure files are deleted in background.
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59499
      c4e19b77
  13. 18 6月, 2016 1 次提交
    • S
      Deprectate filter_deletes · 7b79238b
      sdong 提交于
      Summary: filter_deltes is not a frequently used feature. Remove it.
      
      Test Plan: Run all test suites.
      
      Reviewers: igor, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59427
      7b79238b
  14. 15 6月, 2016 1 次提交
    • S
      Move away from enum char value -1 · 0babce57
      sdong 提交于
      Summary: char is not signed in some platforms. Having negative values confuse those compilers.
      
      Test Plan: Run all existing tests.
      
      Reviewers: andrewkr, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59619
      0babce57
  15. 14 6月, 2016 1 次提交
    • Y
      add option to not flush memtable on open() · bc8af90e
      Yi Wu 提交于
      Summary:
      Add option to not flush memtable on open()
      In case the option is enabled, don't delete existing log files by not updating log numbers to MANIFEST.
      Will still flush if we need to (e.g. memtable full in the middle). In that case we also flush final memtable.
      If wal_recovery_mode = kPointInTimeRecovery, do not halt immediately after encounter corruption. Instead, check if seq id of next log file is last_log_sequence + 1. In that case we continue recovery.
      
      Test Plan: See unit test.
      
      Reviewers: dhruba, horuff, sdong
      
      Reviewed By: sdong
      
      Subscribers: benj, yhchiang, andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57813
      bc8af90e
  16. 11 6月, 2016 1 次提交
    • S
      memtable_prefix_bloom_bits -> memtable_prefix_bloom_bits_ratio and deprecate... · 20699df8
      sdong 提交于
      memtable_prefix_bloom_bits -> memtable_prefix_bloom_bits_ratio and deprecate memtable_prefix_bloom_probes
      
      Summary:
      memtable_prefix_bloom_probes is not a critical option. Remove it to reduce number of options.
      It's easier for users to make mistakes with memtable_prefix_bloom_bits, turn it to memtable_prefix_bloom_bits_ratio
      
      Test Plan: Run all existing tests
      
      Reviewers: yhchiang, igor, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: gunnarku, yoshinorim, MarkCallaghan, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59199
      20699df8
  17. 10 6月, 2016 3 次提交
  18. 21 5月, 2016 1 次提交
  19. 20 5月, 2016 1 次提交
  20. 10 5月, 2016 1 次提交
    • I
      Add bottommost_compression option · 4b317234
      Islam AbdelRahman 提交于
      Summary:
      Add a new option that can be used to set a specific compression algorithm for bottommost level.
      This option will only affect levels larger than base level.
      
      I have also updated CompactionJobInfo to include the compression algorithm used in compaction
      
      Test Plan:
      added new unittest
      existing unittests
      
      Reviewers: andrewkr, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: lightmark, andrewkr, dhruba, yoshinorim
      
      Differential Revision: https://reviews.facebook.net/D57669
      4b317234
  21. 05 5月, 2016 1 次提交
    • Y
      Enable configurable readahead for iterators · 24a24f01
      Yi Wu 提交于
      Summary:
      Add an option `iterator_readahead_size` to `ReadOptions` to enable
      configurable readahead for iterators similar to the corresponding
      option for compaction.
      
      Test Plan:
      ```
      make commit_prereq
      ```
      
      Reviewers: kumar.rangarajan, ott, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: yiwu, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55419
      24a24f01
  22. 03 5月, 2016 1 次提交
  23. 30 4月, 2016 1 次提交
    • Y
      Added EventListener::OnTableFileCreationStarted() callback · a92049e3
      Yi Wu 提交于
      Summary: Added EventListener::OnTableFileCreationStarted. EventListener::OnTableFileCreated will be called on failure case. User can check creation status via TableFileCreationInfo::status.
      
      Test Plan: unit test.
      
      Reviewers: dhruba, yhchiang, ott, sdong
      
      Reviewed By: sdong
      
      Subscribers: sdong, kradhakrishnan, IslamAbdelRahman, andrewkr, yhchiang, leveldb, ott, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56337
      a92049e3
  24. 28 4月, 2016 1 次提交
    • A
      Shared dictionary compression using reference block · 843d2e31
      Andrew Kryczka 提交于
      Summary:
      This adds a new metablock containing a shared dictionary that is used
      to compress all data blocks in the SST file. The size of the shared dictionary
      is configurable in CompressionOptions and defaults to 0. It's currently only
      used for zlib/lz4/lz4hc, but the block will be stored in the SST regardless of
      the compression type if the user chooses a nonzero dictionary size.
      
      During compaction, computes the dictionary by randomly sampling the first
      output file in each subcompaction. It pre-computes the intervals to sample
      by assuming the output file will have the maximum allowable length. In case
      the file is smaller, some of the pre-computed sampling intervals can be beyond
      end-of-file, in which case we skip over those samples and the dictionary will
      be a bit smaller. After the dictionary is generated using the first file in a
      subcompaction, it is loaded into the compression library before writing each
      block in each subsequent file of that subcompaction.
      
      On the read path, gets the dictionary from the metablock, if it exists. Then,
      loads that dictionary into the compression library before reading each block.
      
      Test Plan: new unit test
      
      Reviewers: yhchiang, IslamAbdelRahman, cyan, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, yoshinorim, kradhakrishnan, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52287
      843d2e31
  25. 21 4月, 2016 2 次提交
  26. 19 4月, 2016 1 次提交
    • A
      Delete deprecated *BackupableDB interface for backups · 40b840f2
      Andrew Kryczka 提交于
      Summary:
      This interface is redundant and has been deprecated for a while.
      It's also unused internally. Let's delete it.
      
      I moved the comments to the corresponding functions in BackupEngine/
      BackupEngineReadOnly. This caused the diff tool to not work cleanly.
      
      Test Plan:
      unit tests
      
        $ ./backupable_db_test
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D56331
      40b840f2
  27. 16 4月, 2016 1 次提交
  28. 14 4月, 2016 1 次提交
  29. 01 4月, 2016 1 次提交
    • S
      Change some RocksDB default options · 2feafa3d
      sdong 提交于
      Summary: Change some RocksDB default options to make it more friendly to server workloads.
      
      Test Plan: Run all existing tests
      
      Reviewers: yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: sumeet, muthu, benj, MarkCallaghan, igor, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55941
      2feafa3d
  30. 13 3月, 2016 1 次提交
  31. 12 3月, 2016 1 次提交
    • 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
  32. 11 3月, 2016 1 次提交
    • 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
  33. 02 3月, 2016 1 次提交
  34. 01 3月, 2016 1 次提交
    • S
      Introduce Iterator::GetProperty() and replace Iterator::IsKeyPinned() · 1f595414
      sdong 提交于
      Summary:
      Add Iterator::GetProperty(), a way for users to communicate with iterator, and turn Iterator::IsKeyPinned() with it.
      As a follow-up, I'll ask a property as the version number attached to the iterator
      
      Test Plan: Rerun existing tests and add a negative test case.
      
      Reviewers: yhchiang, andrewkr, kradhakrishnan, anthony, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54783
      1f595414
  35. 12 2月, 2016 1 次提交
    • S
      Add a new compaction priority that picks file whose overlapping ratio is smallest · 92a9ccf1
      sdong 提交于
      Summary:
      Add a new compaction priority as following:
      For every file, we calculate total size of files overalapping with the file in the next level, over the file's size itself. The file with smallest ratio will be picked first.
      My "db_bench --fillrandom" shows about 5% less compaction than kOldestSmallestSeqFirst if --hard_pending_compaction_bytes_limit value to keep LSM tree in shape. If not limiting hard_pending_compaction_bytes_limit, improvement is only 1% or 2%.
      
      Test Plan: Add a unit test
      
      Reviewers: andrewkr, kradhakrishnan, anthony, IslamAbdelRahman, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: MarkCallaghan, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54075
      92a9ccf1
  36. 10 2月, 2016 1 次提交
    • Y
      Allows Get and MultiGet to read directly from SST files. · 4a8cbf4e
      Yueh-Hsuan Chiang 提交于
      Summary:
      Add kSstFileTier to ReadTier, which allows Get and MultiGet to
      read only directly from SST files and skip mem-tables.
      
          kSstFileTier = 0x2      // data in SST files.
                                // Note that this ReadTier currently only supports
                                // Get and MultiGet and does not support iterators.
      
      Test Plan: add new test in db_test.
      
      Reviewers: anthony, IslamAbdelRahman, rven, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: igor, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D53511
      4a8cbf4e