1. 12 4月, 2022 1 次提交
    • Y
      Remove dead code (#9825) · 0ad9ee30
      Yanqin Jin 提交于
      Summary:
      Options `preserve_deletes` and `iter_start_seqnum` have been removed since 7.0.
      
      This PR removes dead code related to these two removed options.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9825
      
      Test Plan: make check
      
      Reviewed By: akankshamahajan15
      
      Differential Revision: D35517950
      
      Pulled By: riversand963
      
      fbshipit-source-id: 86282ce5ec4087acb94a06a42a1b6d55b1715482
      0ad9ee30
  2. 09 4月, 2022 1 次提交
  3. 08 4月, 2022 2 次提交
  4. 07 4月, 2022 7 次提交
    • A
      Fix reseting of async_read_in_progress_ variable in FilePrefetchBuffer to call Poll API (#9815) · 7ea26abb
      Akanksha Mahajan 提交于
      Summary:
      Currently RocksDB reset async_read_in_progress_ in callback
      due to which underlying filesystem relying on Poll API won't be called
      leading to stale memory access.
      In order to fix it, async_read_in_progress_ will be reset after Poll API
      is called to make sure underlying file_system waiting on Poll can clear
      its state or take appropriate action.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9815
      
      Test Plan: CircleCI tests
      
      Reviewed By: anand1976
      
      Differential Revision: D35451534
      
      Pulled By: akankshamahajan15
      
      fbshipit-source-id: b70ef6251a7aa9ed4876ba5e5100baa33d7d474c
      7ea26abb
    • S
      L0 Subcompaction to trim input files (#9802) · e03f8a0c
      sdong 提交于
      Summary:
      When sub compaction is decided for L0->L1 compaction, most of the cases, all L0 files will be involved in all sub compactions. However, it is not always the case. When files are generally (but not strictly) inserted in sequential order, there can be a subset of L0 files invovled. Yet RocksDB always open all those L0 files, and build an iterator, read many of the files' first of last block with expensive readahead. We trim some input files to reduce overhead a little bit.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9802
      
      Test Plan: Add a unit test to cover this case and manually validate the behavior while running the test.
      
      Reviewed By: ajkr
      
      Differential Revision: D35371031
      
      fbshipit-source-id: 701ed7375b5cbe41672e93b38fe8a1503dad08b6
      e03f8a0c
    • P
      Tests for filter compatibility (#9773) · 8ce7cea9
      Peter Dillinger 提交于
      Summary:
      This change adds two unit tests that would each catch the
      regression fixed in https://github.com/facebook/rocksdb/issues/9736
      
      * TableMetaIndexKeys - detects any churn in metaindex block keys
      generated by SST files using standard db_test_util configurations.
      * BloomFilterCompatibility - this detects if any common built-in
      FilterPolicy configurations fail to read filters generated by another.
      (The regression bug caused NewRibbonFilterPolicy not to read filters
      from NewBloomFilterPolicy and vice-versa.) This replaces some previous
      tests that didn't really appear to be testing much of anything except
      basic data correctness, which doesn't tell you a filter is being used.
      
      Light refactoring in meta_blocks.cc/h to support inspecting metaindex
      keys.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9773
      
      Test Plan:
      this is the test. Verified that 7.0.2 fails both tests and 7.0.3 passes.
      With backporting for intentional API changes in 7.0, 6.29 also passes.
      
      Reviewed By: ajkr
      
      Differential Revision: D35236248
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 493dfe9ad7e27524bf7c6c1af8a4b8c31bc6ef5a
      8ce7cea9
    • A
      Add WAL compression to stress tests (#9811) · c3d7e162
      anand76 提交于
      Summary:
      Add the WAL compression feature to the stress test.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9811
      
      Reviewed By: riversand963
      
      Differential Revision: D35414316
      
      Pulled By: anand1976
      
      fbshipit-source-id: 0c17b1ec55679a52f088ad368798b57139bd921a
      c3d7e162
    • P
      Remove public rocksdb-lego-determinator (#9803) · ad32646e
      Peter Dillinger 提交于
      Summary:
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9803
      
      Only use Meta-internal version now. precommit_checker.py also now obsolete
      
      Bring back `make commit_prereq` in follow-up work
      
      Reviewed By: jay-zhuang
      
      Differential Revision: D35372283
      
      fbshipit-source-id: 7428438ca51f878802c301d0d5591675e551a113
      ad32646e
    • A
      Update stats for Read and ReadAsync in random_access_file_reader for async prefetching (#9810) · 0b8f8859
      Akanksha Mahajan 提交于
      Summary:
      Update stats in random_access_file_reader for Read and
      ReadAsync API to take into account the read latency for async
      prefetching.
      
      It also fixes ERROR_HANDLER_AUTORESUME_RETRY_COUNT stat whose value was
      incorrect in portal.h
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9810
      
      Test Plan: Update unit test
      
      Reviewed By: anand1976
      
      Differential Revision: D35433081
      
      Pulled By: akankshamahajan15
      
      fbshipit-source-id: aeec3901270e58a003ce6b5214bd25ddcb3a12a9
      0b8f8859
    • H
      Account memory of big memory users in BlockBasedTable in global memory limit (#9748) · 49623f9c
      Hui Xiao 提交于
      Summary:
      **Context:**
      Through heap profiling, we discovered that `BlockBasedTableReader` objects can accumulate and lead to high memory usage (e.g, `max_open_file = -1`). These memories are currently not saved, not tracked, not constrained and not cache evict-able. As a first step to improve this, similar to https://github.com/facebook/rocksdb/pull/8428,  this PR is to track an estimate of `BlockBasedTableReader` object's memory in block cache and fail future creation if the memory usage exceeds the available space of cache at the time of creation.
      
      **Summary:**
      - Approximate big memory users  (`BlockBasedTable::Rep` and `TableProperties` )' memory usage in addition to the existing estimated ones (filter block/index block/un-compression dictionary)
      - Charge all of these memory usages to block cache on `BlockBasedTable::Open()` and release them on `~BlockBasedTable()` as there is no memory usage fluctuation of concern in between
      - Refactor on CacheReservationManager (and its call-sites) to add concurrent support for BlockBasedTable  used in this PR.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9748
      
      Test Plan:
      - New unit tests
      - db bench: `OpenDb` : **-0.52% in ms**
        - Setup `./db_bench -benchmarks=fillseq -db=/dev/shm/testdb -disable_auto_compactions=1 -write_buffer_size=1048576`
        - Repeated run with pre-change w/o feature and post-change with feature, benchmark `OpenDb`:  `./db_bench -benchmarks=readrandom -use_existing_db=1 -db=/dev/shm/testdb -reserve_table_reader_memory=true (remove this when running w/o feature) -file_opening_threads=3 -open_files=-1 -report_open_timing=true| egrep 'OpenDb:'`
      
      #-run | (feature-off) avg milliseconds | std milliseconds | (feature-on) avg milliseconds | std milliseconds | change (%)
      -- | -- | -- | -- | -- | --
      10 | 11.4018 | 5.95173 | 9.47788 | 1.57538 | -16.87382694
      20 | 9.23746 | 0.841053 | 9.32377 | 1.14074 | 0.9343477536
      40 | 9.0876 | 0.671129 | 9.35053 | 1.11713 | 2.893283155
      80 | 9.72514 | 2.28459 | 9.52013 | 1.0894 | -2.108041632
      160 | 9.74677 | 0.991234 | 9.84743 | 1.73396 | 1.032752389
      320 | 10.7297 | 5.11555 | 10.547 | 1.97692 | **-1.70275031**
      640 | 11.7092 | 2.36565 | 11.7869 | 2.69377 | **0.6635807741**
      
      -  db bench on write with cost to cache in WriteBufferManager (just in case this PR's CRM refactoring accidentally slows down anything in WBM) : `fillseq` : **+0.54% in micros/op**
      `./db_bench -benchmarks=fillseq -db=/dev/shm/testdb -disable_auto_compactions=1 -cost_write_buffer_to_cache=true -write_buffer_size=10000000000 | egrep 'fillseq'`
      
      #-run | (pre-PR) avg micros/op | std micros/op | (post-PR)  avg micros/op | std micros/op | change (%)
      -- | -- | -- | -- | -- | --
      10 | 6.15 | 0.260187 | 6.289 | 0.371192 | 2.260162602
      20 | 7.28025 | 0.465402 | 7.37255 | 0.451256 | 1.267813605
      40 | 7.06312 | 0.490654 | 7.13803 | 0.478676 | **1.060579461**
      80 | 7.14035 | 0.972831 | 7.14196 | 0.92971 | **0.02254791432**
      
      -  filter bench: `bloom filter`: **-0.78% in ms/key**
          - ` ./filter_bench -impl=2 -quick -reserve_table_builder_memory=true | grep 'Build avg'`
      
      #-run | (pre-PR) avg ns/key | std ns/key | (post-PR)  ns/key | std ns/key | change (%)
      -- | -- | -- | -- | -- | --
      10 | 26.4369 | 0.442182 | 26.3273 | 0.422919 | **-0.4145720565**
      20 | 26.4451 | 0.592787 | 26.1419 | 0.62451 | **-1.1465262**
      
      - Crash test `python3 tools/db_crashtest.py blackbox --reserve_table_reader_memory=1 --cache_size=1` killed as normal
      
      Reviewed By: ajkr
      
      Differential Revision: D35136549
      
      Pulled By: hx235
      
      fbshipit-source-id: 146978858d0f900f43f4eb09bfd3e83195e3be28
      49623f9c
  5. 06 4月, 2022 7 次提交
  6. 05 4月, 2022 6 次提交
    • H
      Add Env::IOPriority to IOOptions (#9806) · 9cd47ce5
      Hui Xiao 提交于
      Summary:
      **Context/Todo:**
      As requested, allow IOOptions to take in an Env::IOPriority for convenience to pass down rate limiter related hint to file system level and for future interaction between RocksDB internal's rate limiting and custom file system level's rate-limiting.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9806
      
      Test Plan: No actual code changes in RocksDB internals
      
      Reviewed By: ajkr
      
      Differential Revision: D35388966
      
      Pulled By: hx235
      
      fbshipit-source-id: 5891c97c3f9184cd221a9ab8536ce8dfa8526c08
      9cd47ce5
    • A
      Fix segfault in FilePrefetchBuffer with async_io enabled (#9777) · 36bc3da9
      Akanksha Mahajan 提交于
      Summary:
      If FilePrefetchBuffer object is destroyed and then later Poll() calls callback on object which has been destroyed, it gives segfault on accessing destroyed object. It was caught after adding unit tests that tests Posix implementation of ReadAsync and Poll APIs.
      This PR also updates and fixes existing IOURing tests which were not running locally because RocksDbIOUringEnable function wasn't defined and IOUring was disabled for those tests
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9777
      
      Test Plan: Added new unit test
      
      Reviewed By: anand1976
      
      Differential Revision: D35254002
      
      Pulled By: akankshamahajan15
      
      fbshipit-source-id: 68e80054ffb14ae25c255920ebc6548ca5f130a1
      36bc3da9
    • J
      Fix commit_prereq and other targets (#9797) · ec77a928
      Jay Zhuang 提交于
      Summary:
      Make `commit_prereq` work and a few other improvements:
      * Remove gcc 481 and gcc5xx which are no longer supported
      * Remove platform007 which is gone
      * `make clean` work for both mac and linux
      * `precommit_checker.py` to python3
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9797
      
      Test Plan: `make commit_prereq`
      
      Reviewed By: ajkr
      
      Differential Revision: D35338536
      
      Pulled By: jay-zhuang
      
      fbshipit-source-id: 1e159962ab9d31c43c4b85de7d0f582d3e881ffe
      ec77a928
    • S
      Fix typo about file/sst_file_manager_impl.h (#9799) · f6870640
      SGZW 提交于
      Summary:
      Fix typo deletition-> deletion
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9799
      
      Reviewed By: ajkr
      
      Differential Revision: D35341617
      
      Pulled By: jay-zhuang
      
      fbshipit-source-id: 32bc384b99e5564f6a673076c6a4f160ee6c2e46
      f6870640
    • S
      build_tools/rocksdb-lego-determinator to pass parallelism information for no_compression (#9796) · d4159c80
      sdong 提交于
      Summary:
      Right now, parallelism information passed to "build_tools/rocksdb-lego-determinator no_compression" isn't effective when the test actually runs, as the information is dropped in the middle. Fix it.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9796
      
      Test Plan: Run "build_tools/rocksdb-lego-determinator no_compression" and execute the command line generated and observe the parallelism.
      
      Reviewed By: jay-zhuang
      
      Differential Revision: D35330085
      
      fbshipit-source-id: e9b32d0520d61fbc2697ebd841099485f64482e3
      d4159c80
    • C
      Fix some typos in comments and HISTORY.md (#9798) · cd59b139
      Chen Lixiang 提交于
      Summary:
      compation --> compaction
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9798
      
      Reviewed By: ajkr
      
      Differential Revision: D35341611
      
      Pulled By: jay-zhuang
      
      fbshipit-source-id: 5ea07527c311de75cade219456b6ee52b23020f6
      cd59b139
  7. 03 4月, 2022 1 次提交
  8. 02 4月, 2022 4 次提交
  9. 01 4月, 2022 4 次提交
    • A
      Add benchmark for GetMergeOperands() (#9785) · bfea9e7c
      Andrew Kryczka 提交于
      Summary:
      There's an existing benchmark, "getmergeoperands", but it is unconventional in that it has multiple phases and hardcoded setup parameters.
      
      This PR adds a different one, "readrandomoperands", that follows the pattern of other benchmarks of having a single phase and taking its configuration from existing flags.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9785
      
      Test Plan:
      ```
      $ ./db_bench -benchmarks=mergerandom -merge_operator=StringAppendOperator -write_buffer_size=1048576 -max_bytes_for_level_base=4194304 -target_file_size_base=1048576 -compression_type=none -disable_auto_compactions=true
      $ ./db_bench -use_existing_db=true -benchmarks=readrandomoperands -merge_operator=StringAppendOperator -disable_auto_compactions=true -duration=10
      ...
      readrandomoperands :     542.082 micros/op 1844 ops/sec;    0.2 MB/s (11980 of 18999 found)
      ```
      
      Reviewed By: jay-zhuang
      
      Differential Revision: D35290412
      
      Pulled By: ajkr
      
      fbshipit-source-id: fb367ca614b128cef844a75f0e5d9dd7c3328d85
      bfea9e7c
    • Y
      Encode min_log_number_to_keep and delete_wals_before in one version edit (#9766) · 6eafdf13
      Yanqin Jin 提交于
      Summary:
      min_log_number_to_keep denotes that the WALs whose numbers are below
      this value **will** be deleted by RocksDB.
      delete_wals_before will be used by RocksDB if
      track_and_verify_wals_in_manifest is set to true. During recovery,
      RocksDB uses the info encoded in delete_wals_before to reconstruct its
      knowledge about what WALs to expect existing.
      If these two tags are not encoded in the same VersionEdit, then it's
      possible for min_log_number_to_keep=100 to exist, but
      delete_wals_before=100 to be lost due to power failure. Subsequent
      recovery will delete 99.log. If the db crashes again, the following
      recovery will expect to see 99.log since there is no
      delete_wals_before=100 in the MANIFEST, but the WAL is already deleted.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9766
      
      Test Plan:
      First of all, make check.
      Second, format compatibility.
      SHORT_TEST=1 ./tools/check_format_compatible.sh
      
      Reviewed By: ltamasi
      
      Differential Revision: D35203623
      
      Pulled By: riversand963
      
      fbshipit-source-id: 45623fc4b4b50d299d5e0f9559a3a4c5e9522c8f
      6eafdf13
    • J
      Add microbench document (#9781) · 76383bea
      Jay Zhuang 提交于
      Summary:
      Add basic microbenchmark document
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9781
      
      Reviewed By: gitbw95
      
      Differential Revision: D35272866
      
      Pulled By: jay-zhuang
      
      fbshipit-source-id: f482e652151fd05ca46e29629261833f038a6075
      76383bea
    • S
      Fix DB::Open() error logging (#9784) · bbcf7b19
      sdong 提交于
      Summary:
      Right now we log a wrong error when DB::Open() fails. Fix it.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9784
      
      Test Plan: CI runs should pass
      
      Reviewed By: ajkr, riversand963
      
      Differential Revision: D35290203
      
      fbshipit-source-id: ffc640afa27f6b0a2382ee153dc43f28d9e242be
      bbcf7b19
  10. 31 3月, 2022 6 次提交
  11. 30 3月, 2022 1 次提交