1. 03 2月, 2023 2 次提交
    • C
      Remove NUMA setting for benchmark-linux (#11180) · fec5c8de
      changyubi 提交于
      Summary:
      benchmark-linux is failing on main branch after https://github.com/facebook/rocksdb/issues/11074 with the following error msg:
      ```
      /usr/bin/time -f '%e %U %S' -o /tmp/benchmark-results/8.0.0/benchmark_overwriteandwait.t1.s0.log.time numactl --interleave=all timeout 1200 ./db_bench --benchmarks=overwrite,waitforcompaction,stats --use_existing_db=1 --sync=0 --level0_file_num_compaction_trigger=4 --level0_slowdown_writes_trigger=20 --level0_stop_writes_trigger=30 --max_background_jobs=4 --max_write_buffer_number=8 --undefok=use_blob_cache,use_shared_block_and_blob_cache,blob_cache_size,blob_cache_numshardbits,prepopulate_blob_cache,multiread_batched,cache_low_pri_pool_ratio,prepopulate_block_cache --db=/tmp/rocksdb-benchmark-datadir --wal_dir=/tmp/rocksdb-benchmark-datadir --num=20000000 --key_size=20 --value_size=400 --block_size=8192 --cache_size=10737418240 --cache_numshardbits=6 --compression_max_dict_bytes=0 --compression_ratio=0.5 --compression_type=none --bytes_per_sync=1048576 --cache_index_and_filter_blocks=1 --cache_high_pri_pool_ratio=0.5 --cache_low_pri_pool_ratio=0 --benchmark_write_rate_limit=0 --write_buffer_size=16777216 --target_file_size_base=16777216 --max_bytes_for_level_base=67108864 --verify_checksum=1 --delete_obsolete_files_period_micros=62914560 --max_bytes_for_level_multiplier=8 --statistics=0 --stats_per_interval=1 --stats_interval_seconds=20 --report_interval_seconds=1 --histogram=1 --memtablerep=skip_list --bloom_bits=10 --open_files=-1 --subcompactions=1 --compaction_style=0 --num_levels=8 --min_level_to_compress=3 --level_compaction_dynamic_level_bytes=true --pin_l0_filter_and_index_blocks_in_cache=1 --duration=600 --threads=1 --merge_operator="put" --seed=1675372532 --report_file=/tmp/benchmark-results/8.0.0/benchmark_overwriteandwait.t1.s0.log.r.csv 2>&1 | tee -a /tmp/benchmark-results/8.0.0/benchmark_overwriteandwait.t1.s0.log
      /usr/bin/time: cannot run numactl: No such file or directory
      ```
      This PR removes the newly added NUMA setting.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11180
      
      Test Plan: check next main branch run for benchmark-linux
      
      Reviewed By: ajkr
      
      Differential Revision: D42975930
      
      Pulled By: cbi42
      
      fbshipit-source-id: f084d39aeba9877c0752502e879c5e612b507653
      fec5c8de
    • A
      CI Benchmarking. Small configuration changes based on performance analysis. (#11074) · 6781009e
      Alan Paxton 提交于
      Summary:
      First, we made a small reduction in DURATION_RW as runs were exceeding 1 hour and colliding with subsequent runs.
      
      See Mark Callaghan’s blog post at http://smalldatum.blogspot.com/2023/01/variance-in-rocksdb-benchmarks-on-cloud.html
      
      Configuration parameters which are not consistent with the following email from Mark (see the blog post for more context) have been updated. Where Mark has defined the parameter and we haven't, we define it explicitly. We will need to further monitor for an expected reduction in variance of test times:
      
      To match what I did:
       ---
      
      nsecs=1800
      dbdir=/data/m/rx
      resultdir=bm.lc.nt1.cm1.d0
      
      env WRITE_BUFFER_SIZE_MB=16 TARGET_FILE_SIZE_BASE_MB=16 MAX_BYTES_FOR_LEVEL_BASE_MB=64 MAX_BACKGROUND_JOBS=4 NUM_KEYS=20000000 CACHE_SIZE_MB=10240 DURATION_RW=$nsecs DURATION_RO=$nsecs MB_WRITE_PER_SEC=2 NUM_THREADS=1 COMPRESSION_TYPE=none CACHE_INDEX_AND_FILTER_BLOCKS=1 VALUE_SIZE=400 NUMA=1 MIN_LEVEL_TO_COMPRESS=3 COMPACTION_STYLE=leveled bash benchmark_compare.sh $dbdir $resultdir 7.8.fb
      
      env WRITE_BUFFER_SIZE_MB=16 TARGET_FILE_SIZE_BASE_MB=16 MAX_BYTES_FOR_LEVEL_BASE_MB=64 MAX_BACKGROUND_JOBS=4 NUM_KEYS=200000000 CACHE_SIZE_MB=10240 DURATION_RW=$nsecs DURATION_RO=$nsecs MB_WRITE_PER_SEC=2 NUM_THREADS=1 COMPRESSION_TYPE=lz4 CACHE_INDEX_AND_FILTER_BLOCKS=1 VALUE_SIZE=400 NUMA=1 MIN_LEVEL_TO_COMPRESS=3 COMPACTION_STYLE=leveled bash benchmark_compare.sh $dbdir $resultdir 7.8.fb
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11074
      
      Reviewed By: ajkr
      
      Differential Revision: D42969668
      
      Pulled By: cbi42
      
      fbshipit-source-id: 1ea4e6a3901be4016108f93817eb58f74baac21a
      6781009e
  2. 02 2月, 2023 2 次提交
    • A
      Update HISTORY.md for #11136 (#11177) · 6af16ac7
      Andrew Kryczka 提交于
      Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/11177
      
      Reviewed By: cbi42
      
      Differential Revision: D42948946
      
      Pulled By: ajkr
      
      fbshipit-source-id: 783d3d9007faaa036923a0364cdd0bfbd8e78062
      6af16ac7
    • L
      Clean up InvokeFilterIfNeeded a bit (#11174) · df680b24
      Levi Tamasi 提交于
      Summary:
      The patch makes some code quality enhancements in `CompactionIterator::InvokeFilterIfNeeded`
      including the renaming of `filter` (which is most likely a remnant of the days before the `FilterV2`
      API when the compaction filter used to return a boolean) to `decision`, the removal of some
      outdated comments, the elimination of an `error` flag which was only used in one failure case
      out of many, as well as some small stylistic improvements. (Some the above will also come in
      handy when adding compaction filter support for wide-column entities.)
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11174
      
      Test Plan: `make check`
      
      Reviewed By: akankshamahajan15
      
      Differential Revision: D42901408
      
      Pulled By: ltamasi
      
      fbshipit-source-id: ab382d59a4990c5dfe1cee219d49e1d80902b666
      df680b24
  3. 01 2月, 2023 3 次提交
  4. 31 1月, 2023 3 次提交
    • P
      Cleanup, improve, stress test LockWAL() (#11143) · 94e3beec
      Peter Dillinger 提交于
      Summary:
      The previous API comments for LockWAL didn't provide much about why you might want to use it, and didn't really meet what one would infer its contract was. Also, LockWAL was not in db_stress / crash test. In this change:
      
      * Implement a counting semantics for LockWAL()+UnlockWAL(), so that they can safely be used concurrently across threads or recursively within a thread. This should make the API much less bug-prone and easier to use.
      * Make sure no UnlockWAL() is needed after non-OK LockWAL() (to match RocksDB conventions)
      * Make UnlockWAL() reliably return non-OK when there's no matching LockWAL() (for debug-ability)
      * Clarify API comments on LockWAL(), UnlockWAL(), FlushWAL(), and SyncWAL(). Their exact meanings are not obvious, and I don't think it's appropriate to talk about implementation mutexes in the API comments, but about what operations might block each other.
      * Add LockWAL()/UnlockWAL() to db_stress and crash test, mostly to check for assertion failures, but also checks that latest seqno doesn't change while WAL is locked. This is simpler to add when LockWAL() is allowed in multiple threads.
      * Remove unnecessary use of sync points in test DBWALTest::LockWal. There was a bug during development of above changes that caused this test to fail sporadically, with and without this sync point change.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11143
      
      Test Plan: unit tests added / updated, added to stress/crash test
      
      Reviewed By: ajkr
      
      Differential Revision: D42848627
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 6d976c51791941a31fd8fbf28b0f82e888d9f4b4
      94e3beec
    • S
      DB Stress to fix a false assertion (#11164) · 36174d89
      sdong 提交于
      Summary:
      Seeting this error in stress test:
      
      db_stress: internal_repo_rocksdb/repo/db_stress_tool/db_stress_test_base.cc:2459: void rocksdb::StressTest::Open(rocksdb::SharedState *): Assertion `txn_db_ == nullptr' failed. Received signal 6 (Aborted)
      ......
      
      It doesn't appear that txn_db_ is set to nullptr at all. We set ithere.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11164
      
      Test Plan: Run db_stress transaction and non-transation with low kill rate and see restarting without assertion
      
      Reviewed By: ajkr
      
      Differential Revision: D42855662
      
      fbshipit-source-id: 06816d37cce9c94a81cb54ab238fb73aa102ed46
      36174d89
    • Y
      Use user key on sst file for blob verification for Get and MultiGet (#11105) · 24ac53d8
      Yu Zhang 提交于
      Summary:
      Use the user key on sst file for blob verification for `Get` and `MultiGet` instead of the user key passed from caller.
      
      Add tests for `Get` and `MultiGet` operations when user defined timestamp feature is enabled in a BlobDB.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11105
      
      Test Plan:
      make V=1 db_blob_basic_test
      ./db_blob_basic_test --gtest_filter="DBBlobTestWithTimestamp.*"
      
      Reviewed By: ltamasi
      
      Differential Revision: D42716487
      
      Pulled By: jowlyzhang
      
      fbshipit-source-id: 5987ecbb7e56ddf46d2467a3649369390789506a
      24ac53d8
  5. 28 1月, 2023 3 次提交
    • A
      Move ExternalSSTTestEnv to FileSystemWrapper (#11139) · 79e57a39
      akankshamahajan 提交于
      Summary:
      Migrate ExternalSSTTestEnv to FileSystemWrapper
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11139
      
      Reviewed By: anand1976
      
      Differential Revision: D42780180
      
      Pulled By: akankshamahajan15
      
      fbshipit-source-id: 9a4448c9fe5186b518235fe11e1a34dcad897cdd
      79e57a39
    • S
      Remove RocksDB LITE (#11147) · 4720ba43
      sdong 提交于
      Summary:
      We haven't been actively mantaining RocksDB LITE recently and the size must have been gone up significantly. We are removing the support.
      
      Most of changes were done through following comments:
      
      unifdef -m -UROCKSDB_LITE `git grep -l ROCKSDB_LITE | egrep '[.](cc|h)'`
      
      by Peter Dillinger. Others changes were manually applied to build scripts, CircleCI manifests, ROCKSDB_LITE is used in an expression and file db_stress_test_base.cc.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11147
      
      Test Plan: See CI
      
      Reviewed By: pdillinger
      
      Differential Revision: D42796341
      
      fbshipit-source-id: 4920e15fc2060c2cd2221330a6d0e5e65d4b7fe2
      4720ba43
    • Y
      Remove deprecated util functions in options_util.h (#11126) · 6943ff6e
      Yu Zhang 提交于
      Summary:
      Remove the util functions in options_util.h that have previously been marked deprecated.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11126
      
      Test Plan: `make check`
      
      Reviewed By: ltamasi
      
      Differential Revision: D42757496
      
      Pulled By: jowlyzhang
      
      fbshipit-source-id: 2a138a3c207d0e0e0bbb4d99548cf2cadb44bcfb
      6943ff6e
  6. 27 1月, 2023 6 次提交
  7. 26 1月, 2023 7 次提交
    • A
      Migrate TestEnv in listener_test.cc to FileSystemWrapper (#11125) · 986c5b9d
      akankshamahajan 提交于
      Summary:
      Migrate derived classes from EnvWrapper to FileSystemWrapper so we can eventually deprecate the storage methods in Env.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11125
      
      Test Plan: CircleCI jobs
      
      Reviewed By: anand1976
      
      Differential Revision: D42732241
      
      Pulled By: akankshamahajan15
      
      fbshipit-source-id: c89a70a79fcfb13e158bf8919b1a87a9de133222
      986c5b9d
    • S
      Remove Stats related to compressed block cache (#11135) · e808858a
      sdong 提交于
      Summary:
      Since compressed block cache is removed, those stats are not needed. They are removed in different PR in case there is a problem with it. The stats are removed in the same way in https://github.com/facebook/rocksdb/pull/11131/ . HISTORY.md was already updated by mistake, and it would be correct after merging this PR.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11135
      
      Test Plan: Watch CI
      
      Reviewed By: ltamasi
      
      Differential Revision: D42757616
      
      fbshipit-source-id: bd7cb782585c8535ce5784295225c376f3011f35
      e808858a
    • L
      Remove more obsolete statistics (#11131) · 6da2e20d
      Levi Tamasi 提交于
      Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/11131
      
      Test Plan: `make check`
      
      Reviewed By: pdillinger
      
      Differential Revision: D42753997
      
      Pulled By: ltamasi
      
      fbshipit-source-id: ce8b84c1e55374257e93ed74fd255c9b759723ce
      6da2e20d
    • H
      Fix build with gcc 13 by including <cstdint> (#11118) · 88edfbfb
      Heiko Becker 提交于
      Summary:
      Like other versions before, gcc 13 moved some includes around and as a result <cstdint> is no longer transitively included [1]. Explicitly include it for uint{32,64}_t.
      
      [1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11118
      
      Reviewed By: cbi42
      
      Differential Revision: D42711356
      
      Pulled By: ajkr
      
      fbshipit-source-id: 5ea257b85b7017f40fd8fdbce965336da95c55b2
      88edfbfb
    • A
      Support PutEntity in trace analyzer (#11127) · 6a5071ce
      Andrew Kryczka 提交于
      Summary:
      Add the most basic support such that trace_analyzer commands no longer fail with
      ```
      Cannot process the write batch in the trace
      Cannot process the TraceRecord
      PutEntityCF not implemented
      Cannot process the trace
      ```
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11127
      
      Reviewed By: cbi42
      
      Differential Revision: D42732319
      
      Pulled By: ajkr
      
      fbshipit-source-id: 162d8a31318672a46539b1b042ec25f69b25c4ed
      6a5071ce
    • P
      Fix DelayWrite() calls for two_write_queues (#11130) · 546e213c
      Peter Dillinger 提交于
      Summary:
      PR https://github.com/facebook/rocksdb/issues/11020 fixed a case where it was easy to deadlock the DB with LockWAL() but introduced a bug showing up as a rare assertion failure in the stress test. Specifically, `assert(w->state == STATE_INIT)` in `WriteThread::LinkOne()` called from `BeginWriteStall()`, `DelayWrite()`, `WriteImplWALOnly()`. I haven't been about to generate a unit test that reproduces this failure but I believe the root cause is that DelayWrite() was never meant to be re-entrant, only called from the DB's write_thread_ leader. https://github.com/facebook/rocksdb/issues/11020 introduced a call to DelayWrite() from the nonmem_write_thread_ group leader.
      
      This fix is to make DelayWrite() apply to the specific write queue that it is being called from (inject a dummy write stall entry to the head of the appropriate write queue). WriteController is re-entrant, based on polling and state changes signalled with bg_cv_, so can manage stalling two queues. The only anticipated complication (called out by Andrew in previous PR) is that we don't want timed write delays being injected in parallel for the two queues, because that dimishes the intended throttling effect. Thus, we only allow timed delays for the primary write queue.
      
      HISTORY not updated because this is intended for the same release where the bug was introduced.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11130
      
      Test Plan:
      Although I was not able to reproduce the assertion failure, I was able to reproduce a distinct flaw with what I believe is the same root cause: a kind of deadlock if both write queues need to wake up from stopped writes. Only one will be waiting on bg_cv_ (the other waiting in `LinkOne()` for the write queue to open up), so a single SignalAll() will only unblock one of the queues, with the other re-instating the stop until another signal on bg_cv_. A simple unit test is added for this case.
      
      Will also run crash_test_with_multiops_wc_txn for a while looking for issues.
      
      Reviewed By: ajkr
      
      Differential Revision: D42749330
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 4317dd899a93d57c26fd5af7143038f82d4d4d1b
      546e213c
    • P
      Remove deprecated Env::LoadEnv() (#11121) · 9afa0f05
      Peter Dillinger 提交于
      Summary:
      Can use Env::CreateFromString() instead
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11121
      
      Test Plan: unit tests updated
      
      Reviewed By: cbi42
      
      Differential Revision: D42723813
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 5d4b5b10225dfdaf662f5f8049ee965a05d3edc9
      9afa0f05
  8. 25 1月, 2023 6 次提交
    • L
      Remove some deprecated/obsolete statistics from the API (#11123) · 99e55953
      Levi Tamasi 提交于
      Summary:
      These tickers/histograms have been obsolete (and not populated) for a long time.
      The patch removes them from the API completely. Note that this means that the
      numeric values of the remaining tickers change in the C++ code as they get shifted up.
      This should be OK: the values of some existing tickers have changed many times
      over the years as items have been added in the middle. (In contrast, the convention
      in the Java bindings is to keep the ids, which are not guaranteed to be the same
      as the ids on the C++ side, the same across releases.)
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11123
      
      Test Plan: `make check`
      
      Reviewed By: akankshamahajan15
      
      Differential Revision: D42727793
      
      Pulled By: ltamasi
      
      fbshipit-source-id: e058a155a20b05b45f53e67ee380aece1b43b6c5
      99e55953
    • A
      Migrate ErrorEnv from EnvWrapper to FileSystemWrapper (#11124) · bcbab59c
      anand76 提交于
      Summary:
      Migrate ErrorEnv from EnvWrapper to FileSystemWrapper so we can eventually deprecate the storage methods in Env.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11124
      
      Reviewed By: akankshamahajan15
      
      Differential Revision: D42727791
      
      Pulled By: anand1976
      
      fbshipit-source-id: e8362ad624dc28e55c99fc35eda12866755f62c6
      bcbab59c
    • S
      Remove compressed block cache (#11117) · 2800aa06
      sdong 提交于
      Summary:
      Compressed block cache is replaced by compressed secondary cache. Remove the feature.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11117
      
      Test Plan: See CI passes
      
      Reviewed By: pdillinger
      
      Differential Revision: D42700164
      
      fbshipit-source-id: 6cbb24e460da29311150865f60ecb98637f9f67d
      2800aa06
    • P
      A better contract for best_efforts_recovery (#11085) · 4a918534
      Peter Dillinger 提交于
      Summary:
      Capture more of the original intent at a high level, without getting bogged down in low-level details.
      
      The old text made some weak promises about handling of LOCK files. There should be no specific concern for LOCK files, because we already rely on LockFile() to create the file if it's not present already. And the lock file is generally size 0, so don't have to worry about truncation. Added a unit test.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11085
      
      Test Plan: existing tests, and a new one.
      
      Reviewed By: siying
      
      Differential Revision: D42713233
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 2fce7c974d35fac065037c9c4c7326a59c9fe340
      4a918534
    • C
      Improve documentation for `allow_ingest_behind` (#11119) · e0ea0dc6
      Changyu Bi 提交于
      Summary:
      update documentation to mention that only universal compaction is supported.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11119
      
      Reviewed By: ajkr
      
      Differential Revision: D42715986
      
      Pulled By: cbi42
      
      fbshipit-source-id: 91b145d3318334cb92857c5c0ffc0efed6fa4363
      e0ea0dc6
    • H
      Fix data race on `ColumnFamilyData::flush_reason` by letting FlushRequest/Job... · 86fa2592
      Hui Xiao 提交于
      Fix data race on `ColumnFamilyData::flush_reason` by letting FlushRequest/Job owns flush_reason instead of CFD (#11111)
      
      Summary:
      **Context:**
      Concurrent flushes on the same CF can set on `ColumnFamilyData::flush_reason` before each other flush finishes. An symptom is one CF has different flush_reason with others though all of them are in an atomic flush  `db_stress: db/db_impl/db_impl_compaction_flush.cc:423: rocksdb::Status rocksdb::DBImpl::AtomicFlushMemTablesToOutputFiles(const rocksdb::autovector<rocksdb::DBImpl::BGFlushArg>&, bool*, rocksdb::JobContext*, rocksdb::LogBuffer*, rocksdb::Env::Priority): Assertion cfd->GetFlushReason() == cfds[0]->GetFlushReason() failed. `
      
      **Summary:**
      Suggested by ltamasi, we now refactor and let FlushRequest/Job to own flush_reason as there is no good way to define `ColumnFamilyData::flush_reason` in face of concurrent flushes on the same CF (which wasn't the case a long time ago when `ColumnFamilyData::flush_reason ` first introduced`)
      
      **Tets:**
      - new unit test
      - make check
      - aggressive crash test rehearsal
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11111
      
      Reviewed By: ajkr
      
      Differential Revision: D42644600
      
      Pulled By: hx235
      
      fbshipit-source-id: 8589c8184869d3415e5b780c887f877818a5ebaf
      86fa2592
  9. 24 1月, 2023 1 次提交
  10. 21 1月, 2023 2 次提交
    • A
      Add API to limit blast radius of merge operator failure (#11092) · b7fbcefd
      Andrew Kryczka 提交于
      Summary:
      Prior to this PR, `FullMergeV2()` can only return `false` to indicate failure, which causes any operation invoking it to fail. During a compaction, such a failure causes the compaction to fail and causes the DB to irreversibly enter read-only mode. Some users asked for a way to allow the merge operator to fail without such widespread damage.
      
      To limit the blast radius of merge operator failures, this PR introduces the `MergeOperationOutput::op_failure_scope` API. When unpopulated (`kDefault`) or set to `kTryMerge`, the merge operator failure handling is the same as before. When set to `kMustMerge`, merge operator failure still causes failure to operations that must merge (`Get()`, iterator, `MultiGet()`, etc.). However, under `kMustMerge`, flushes/compactions can survive merge operator failures by outputting the unmerged input operands.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11092
      
      Reviewed By: siying
      
      Differential Revision: D42525673
      
      Pulled By: ajkr
      
      fbshipit-source-id: 951dc3bf190f86347dccf3381be967565cda52ee
      b7fbcefd
    • A
      Enhance async scan prefetch unit tests (#11087) · bde65052
      akankshamahajan 提交于
      Summary:
      Add more coverage in unit tests for async scan. The added unit test fails without PR https://github.com/facebook/rocksdb/pull/10939.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11087
      
      Test Plan: CircleCI jobs status for new unit tests.
      
      Reviewed By: anand1976
      
      Differential Revision: D42487931
      
      Pulled By: akankshamahajan15
      
      fbshipit-source-id: d59ed7666599bd0d2733ac5d76bd70984b54c5a9
      bde65052
  11. 20 1月, 2023 3 次提交
    • qq_39353189's avatar
      Fix error maybe-uninitialized #11100 (#11101) · f4a5446c
      qq_39353189 提交于
      Summary:
      In this issue [11100](https://github.com/facebook/rocksdb/issues/11100)
      I try to upgrade dependencies of [BaikalDB](https://github.com/baidu/BaikalDB) and tool chain to gcc-12.I found that when I build rocksdb v6.26.0(maybe I can use newer version),I found that in file trace_replay/trace_replay.cc,the compiler tell me "error mybe-uninitialized".I dound that it can be fixed very easy,so I make this pull request.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11101
      
      Reviewed By: ajkr
      
      Differential Revision: D42583031
      
      Pulled By: cbi42
      
      fbshipit-source-id: 7f399f09441a30fe88b83cec5e2fd9885bad5c06
      f4a5446c
    • L
      remove unused InternalIteratorBase::is_mutable_ (#11104) · a5bcbcd8
      leipeng 提交于
      Summary:
      `InternalIteratorBase::is_mutable_` is not used any more, remove it.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11104
      
      Reviewed By: ajkr
      
      Differential Revision: D42582747
      
      Pulled By: cbi42
      
      fbshipit-source-id: d30bf75151fc8414df0ae112a6ec4943b5b7330b
      a5bcbcd8
    • P
      Upgrade xxhash.h to latest dev (#11098) · fd911f96
      Peter Dillinger 提交于
      Summary:
      Upgrading xxhash.h to latest dev version as of 1/17/2023, which is d7197ddea81364a539051f116ca77926100fc77f This should improve performance on some ARM machines.
      
      I allowed some of our RocksDB-specific changes to be made obsolete where it seemed appropriate, for example
      * xxhash.h has its own fallthrough marker (which I hope works for us)
      * As in https://github.com/Cyan4973/xxHash/pull/549
      
      Merging and resolving conflicts one way or the other was all that went into this diff. Except I had to mix the two sides around `defined(__loongarch64)`
      
      How I did the upgrade (for future reference), so that I could use usual merge conflict resolution:
      ```
      # New branch to help with merging
      git checkout -b xxh_merge_base
      # Check out RocksDB revision before last xxhash.h upgrade
      git reset --hard 22161b75^
      # Create a commit with the raw base version from xxHash repo (from xxHash repo)
      git show 2c611a76f914828bed675f0f342d6c4199ffee1e:xxhash.h > ../rocksdb/util/xxhash.h
      # In RocksDB repo
      git commit -a
      # Merge in the last xxhash.h upgrade
      git merge 22161b75
      # Resolve conflict using committed version
      git show 22161b75:util/xxhash.h > util/xxhash.h
      git commit -a
      # Catch up to upstream
      git merge upstream/main
      
      # Create a different branch for applying raw upgrade
      git checkout -b xxh_upgrade_2023
      # Find the RocksDB commit we made for the raw base version from xxHash
      git log main..HEAD
      # Rewind to it
      git reset --hard 2428b727
      # Copy in latest raw version (from xxHash repo)
      cat xxhash.h > ../rocksdb/util/xxhash.h
      # Merge in RocksDB changes, use typical tools for conflict resolution
      git merge xxh_merge_base
      ```
      
      Branch https://github.com/facebook/rocksdb/tree/xxhash_merge_base can be used as a base for future xxhash merges.
      
      Fixes https://github.com/facebook/rocksdb/issues/11073
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/11098
      
      Test Plan:
      existing tests (e.g. Bloom filter schema stability tests)
      
      Also seems to include a small performance boost on my Intel dev machine, using `./db_bench --benchmarks=xxh3[-X50] 2>&1 | egrep -o 'operations;.*' | sort`
      
      Fastest out of 50 runs, before: 15477.3 MB/s
      Fastest out of 50 runs, after: 15850.7 MB/s, and 11 more runs faster than the "before" number
      
      Slowest out of 50 runs, before: 12267.5 MB/s
      Slowest out of 50 runs, after: 13897.1 MB/s
      
      More repetitions show the distinction is repeatable
      
      Reviewed By: hx235
      
      Differential Revision: D42560010
      
      Pulled By: pdillinger
      
      fbshipit-source-id: c43ee52f1c5fe0ba3d6d6e4eebb22ded5f5492ea
      fd911f96
  12. 19 1月, 2023 2 次提交