1. 28 9月, 2021 5 次提交
  2. 27 9月, 2021 1 次提交
    • M
      Make SliceTransform into a Customizable class (#8641) · e0f697d2
      mrambacher 提交于
      Summary:
      Made SliceTransform into a Customizable class.
      
      Would be nice to write a test that stored and used a custom transform  in an SST table.
      
      There are a set of tests (DBBlockFliterTest.PrefixExtractor*, SamePrefixTest.InDomainTest, PrefixTest.PrefixAndWholeKeyTest that run the same with or without a SliceTransform/PrefixFilter.  Is this expected?
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8641
      
      Reviewed By: zhichao-cao
      
      Differential Revision: D31142793
      
      Pulled By: mrambacher
      
      fbshipit-source-id: bb08672fccbfdc263dcae21f25a62307e1facda1
      e0f697d2
  3. 25 9月, 2021 4 次提交
    • Y
      Sort per-file blob read requests by offset (#8953) · b92cef2d
      Yanqin Jin 提交于
      Summary:
      `RandomAccessFileReader::MultiRead()` tries to merge requests in direct IO, assuming input IO requests are
      sorted by offsets.
      
      Add a test in direct IO mode.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8953
      
      Test Plan: make check
      
      Reviewed By: ltamasi
      
      Differential Revision: D31183546
      
      Pulled By: riversand963
      
      fbshipit-source-id: 5d043ec68e2daa47a3149066150afd41ee3d73e6
      b92cef2d
    • A
      Temporarily set experimental_mempurge_threshold=0 in crash test (#8958) · 6d424be9
      Andrew Kryczka 提交于
      Summary:
      For now, disable it since the below command indicates it can cause a
      failure. Running that command with `-experimental_mempurge_threshold=0`
      has been running successfully for several minutes, whereas before it
      failed in seconds.
      
      ```
      $ while rm -rf /dev/shm/single_stress && ./db_stress --clear_column_family_one_in=0 --column_families=1 --db=/dev/shm/single_stress --experimental_mempurge_threshold=5.493146827397074 --flush_one_in=10000 --reopen=0 --write_buffer_size=262144 --value_size_mult=33 --max_write_buffer_number=3 -ops_per_thread=10000; do : ; done
      ```
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8958
      
      Reviewed By: ltamasi
      
      Differential Revision: D31187059
      
      Pulled By: ajkr
      
      fbshipit-source-id: 04d5bfb4fcc4f5b66233e691427dfd940c67037f
      6d424be9
    • A
      Prevent deadlock in db_stress with DbStressCompactionFilter (#8956) · 791bff5b
      Andrew Kryczka 提交于
      Summary:
      The cyclic dependency was:
      
      - `StressTest::OperateDb()` locks the mutex for key 'k'
      - `StressTest::OperateDb()` calls a function like `PauseBackgroundWork()`, which waits for pending compaction to complete.
      - The pending compaction reaches key `k` and `DbStressCompactionFilter::FilterV2()` calls `Lock()` on that key's mutex, which hangs forever.
      
      The cycle can be broken by using a new function, `port::Mutex::TryLock()`, which returns immediately upon failure to acquire a lock. In that case `DbStressCompactionFilter::FilterV2()` can just decide to keep the key.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8956
      
      Reviewed By: riversand963
      
      Differential Revision: D31183718
      
      Pulled By: ajkr
      
      fbshipit-source-id: 329e4a31ce43085af174cf367ef560b5a04399c5
      791bff5b
    • J
      Add microbench build support for fbcode (#8954) · 0595101c
      Jay Zhuang 提交于
      Summary:
      For internal build enviroment only. Developer could run the
      microbenchmark without `ROCKSDB_NO_FBCODE=1`.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8954
      
      Test Plan: `$ make microbench` on dev server
      
      Reviewed By: ajkr
      
      Differential Revision: D31163717
      
      Pulled By: jay-zhuang
      
      fbshipit-source-id: 1ff59f660ca05afd0fd5c7c7dcdfd831ac365462
      0595101c
  4. 24 9月, 2021 1 次提交
    • S
      FaultInjectionTestFS::InjectThreadSpecificReadError() should not corrupt mmaped bytes (#8952) · 7c6a7e8f
      sdong 提交于
      Summary:
      Right now FaultInjectionTestFS::InjectThreadSpecificReadError() might try to corrupt return bytes, but these bytes might be from mmapped files, which would cause segfault. Instead FaultInjectionTestFS::InjectThreadSpecificReadError() should never corrupt data unless it is in caller's buffer.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8952
      
      Test Plan: See db_stress still runs and make sure in a test run failurs are still injected in non-mmap cases.
      
      Reviewed By: ajkr, ltamasi
      
      Differential Revision: D31147318
      
      fbshipit-source-id: 9484a64ff2aaa36685557203f449286e694e65f9
      7c6a7e8f
  5. 23 9月, 2021 3 次提交
  6. 22 9月, 2021 6 次提交
    • H
      Make RateLimiter::GetTotalPendingRequest() non pure virtual for backward compability (#8938) · 58444ead
      Hui Xiao 提交于
      Summary:
      Context/Summary:
      https://github.com/facebook/rocksdb/pull/8890 added a public API `RateLimiter::GetTotalPendingRequest()` but mistakenly marked it as pure virtual, forcing RateLimiter's derived classes to implement this function and breaking backward compatibility.
      
      This PR makes `RateLimiter::GetTotalPendingRequest()` as non-pure virtual method by providing a trivial implementation in rate_limiter.h
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8938
      
      Test Plan: Passing existing tests
      
      Reviewed By: pdillinger
      
      Differential Revision: D31100661
      
      Pulled By: hx235
      
      fbshipit-source-id: 06eff1005156a6e5a881e393b2c5b2ad706897d8
      58444ead
    • S
      Improve fault injection to MultiRead (#8937) · 93200677
      sdong 提交于
      Summary:
      Several improvements to MultiRead:
      1. Fix a bug in stress test which causes false positive when both MultiRead() return and individual read request have failure injected.
      2. Add two more types of fault that should be handled: empty read results and checksum mismatch
      3. Add a message indicating which type of fault is injected
      4. Increase the failure rate
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8937
      
      Reviewed By: anand1976
      
      Differential Revision: D31085930
      
      fbshipit-source-id: 3a04994a3cadebf9a64d25e1fe12b14b7a272fba
      93200677
    • S
      RandomAccessFileReader::MultiRead() should not return read bytes not read (#8941) · fcce1f2c
      sdong 提交于
      Summary:
      Right now, if underlying read returns fewer bytes than asked for, RandomAccessFileReader::MultiRead() still returns those in the buffer to upper layer. This can be a surprise to upper layer.
      This is unlikely to cause incorrect data. To cause incorrect data, checksum checking in upper layer should pass with short reads, whose chance is low.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8941
      
      Test Plan: Run stress tests for a while
      
      Reviewed By: anand1976
      
      Differential Revision: D31085780
      
      fbshipit-source-id: 999adf2d6c2712f1323d14bb68b678df59969973
      fcce1f2c
    • S
      Fix flaky ldb_cmd_test tests caused by file deletions during validation (#8942) · 1de58866
      sdong 提交于
      Summary:
      In FileChecksumTestHelper::VerifyEachFileChecksum(), we query the file list, and then for each file in the list verify the checksum. However, compaction can delete those files in the mean time and cause failures. To prevent it from happening, disable file deletion during the validation.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8942
      
      Test Plan: Run exsiting test and see it doesn't fail.
      
      Reviewed By: pdillinger
      
      Differential Revision: D31086488
      
      fbshipit-source-id: 554608f36d2dd3bf0a20dfc4039c68bd8533d7f8
      1de58866
    • P
      Finish BackupEngine migration to IOStatus (#8940) · 5268cdc9
      Peter Dillinger 提交于
      Summary:
      Updates a few remaining functions that should have been updated
      from Status -> IOStatus, and adds to HISTORY for the overall change
      including https://github.com/facebook/rocksdb/issues/8820.
      
      This change is for inclusion in version 6.25.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8940
      
      Test Plan: CI
      
      Reviewed By: zhichao-cao
      
      Differential Revision: D31085029
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 91557c6a39ef1d90357d4f4dcd79af0645d87c7b
      5268cdc9
    • M
      Make SystemClock into a Customizable Class (#8636) · 69248698
      mrambacher 提交于
      Summary:
      Made SystemClock into a Customizable class, complete with CreateFromString.
      
      Cleaned up some of the existing SystemClock implementations that were redundant (NoSleep was the same as the internal one for MockEnv).
      
      Changed MockEnv construction to allow Clock to be passed to the Memory/MockFileSystem.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8636
      
      Reviewed By: zhichao-cao
      
      Differential Revision: D30483360
      
      Pulled By: mrambacher
      
      fbshipit-source-id: cd0e3a876c39f8c98fe13374c06e8edbd5b9f2a1
      69248698
  7. 21 9月, 2021 1 次提交
  8. 19 9月, 2021 1 次提交
  9. 18 9月, 2021 5 次提交
    • J
      RemoteCompaction support Fallback to local compaction (#8709) · 1c290c78
      Jay Zhuang 提交于
      Summary:
      Add support for fallback to local compaction, the user can
      return `CompactionServiceJobStatus::kUseLocal` to instruct RocksDB to
      run the compaction locally instead of waiting for the remote compaction
      result.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8709
      
      Test Plan: unittest
      
      Reviewed By: ajkr
      
      Differential Revision: D30560163
      
      Pulled By: jay-zhuang
      
      fbshipit-source-id: 65d8905a4a1bc185a68daa120997f21d3198dbe1
      1c290c78
    • Y
      Batch blob read IO for MultiGet (#8699) · b512f4bc
      Yanqin Jin 提交于
      Summary:
      In batched `MultiGet()`, RocksDB batches blob read IO and uses `RandomAccessFileReader::MultiRead()`
      to read the blobs instead of issuing multiple `Read()`.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8699
      
      Test Plan:
      ```
      make check
      ```
      
      Reviewed By: ltamasi
      
      Differential Revision: D31030861
      
      Pulled By: riversand963
      
      fbshipit-source-id: a0df6060cbfd54cff9515a4eee08807b1dbcb0c8
      b512f4bc
    • S
      Fix ldb --try_load_options doesn't use customized Env (#8929) · ba48ff83
      sdong 提交于
      Summary:
      As title. The reason is that after loading customized options, the env is not set back to the correct one. Fix it.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8929
      
      Test Plan: Manually validate in an environment where the command failed.
      
      Reviewed By: riversand963
      
      Differential Revision: D31026931
      
      fbshipit-source-id: c25dc788bf80ed5bf4b24922c442781943bcd65b
      ba48ff83
    • P
      Change `SstFileMetaData::size` from `size_t` to `uint64_t` (#8926) · 4149d044
      Peter Dillinger 提交于
      Summary:
      Because even 32-bit systems can have large files
      
      This is a "change" that I don't want intermingled with an upcoming refactoring.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8926
      
      Test Plan: CI
      
      Reviewed By: zhichao-cao
      
      Differential Revision: D31020974
      
      Pulled By: pdillinger
      
      fbshipit-source-id: ca9eb4510697df6f1f55e37b37730b88b1809a92
      4149d044
    • H
      Improve rate_limiter_test.cc (#8904) · 65411b8d
      Hui Xiao 提交于
      Summary:
      - Fixed a bug in `RateLimiterTest.GeneratePriorityIterationOrder` that the callbacks in this test were not called starting from `i = 1`. Fix by increasing `rate_bytes_per_sec` and requested bytes.
         - The bug is due to the previous `rate_bytes_per_sec` was set too small, resulting in `refill_bytes_per_period`  less than  `kMinRefillBytesPerPeriod`. Hence the actual `refill_bytes_per_period` was equal to `kMinRefillBytesPerPeriod` due to the logic [here](https://github.com/facebook/rocksdb/blob/main/util/rate_limiter.cc#L302-L303)  and it ended up being greater than the previously set requested bytes. Therefore starting from `i = 1`, `RefillBytesAndGrantRequests()` and `GeneratePriorityIterationOrder` won't be called and the test callbacks was not triggered to execute the assertion.
      - Added internal flag to assert callbacks are called in `RateLimiterTest.GeneratePriorityIterationOrder` to prevent any future changes defeat the purpose of the test [as suggested](https://github.com/facebook/rocksdb/pull/8890#discussion_r704915134)
      - Increased `rate_bytes_per_sec` and bytes of each request in `RateLimiterTest.GetTotalBytesThrough`, `RateLimiterTest.GetTotalRequests`, `RateLimiterTest.GetTotalPendingRequests` to trigger the "long path" of execution (i.e, the one trigger RefillBytesAndGrantRequests()) to increase test coverage
         - This increased the running time of the three tests, see test plan for time difference running locally
      - Cleared up sync point effects after each test by calling `SyncPoint::GetInstance()->DisableProcessing();` and `SyncPoint::GetInstance()->ClearAllCallBacks();` in `~RateLimiterTest()` [as suggested](https://github.com/facebook/rocksdb/pull/8595/files#r697534279)
        - It's fine to call these two methods even when `EnableProcessing()` or `SetCallBack()` is not called in the test or is already cleaned up. In those cases, calling these two functions in destructor is effectively no-op.
        - This will allow cleaning up sync point effects of previous test even when the previous test failed in assertion.
      - Added missing `SyncPoint::GetInstance()->DisableProcessing();` and `SyncPoint::GetInstance()->ClearCallBacks(..);` in existing tests for completeness
      - Called `SyncPoint::GetInstance()->DisableProcessing();` and `SyncPoint::GetInstance()->ClearCallBacks(..);` in loop in `RateLimiterTest.GeneratePriorityIterationOrder` for completeness
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8904
      
      Test Plan:
      - Passing existing tests
      - To verify the 1st change, run `RateLimiterTest.GeneratePriorityIterationOrder` with assertions of callbacks are indeed called under original `rate_bytes_per_sec` and request byte and under updated `rate_bytes_per_sec` and request byte. The former will fail the assertion while the latter succeeds.
      - Here is the increased test time due to the 3rd change mentioned above in the summary. The relevant 3 tests mentioned in total increase the test time by 6s (~6000/33848 = 17.7% of the original total test time), which IMO is acceptable for better test coverage through running the "long path".
         - current (run on branch rate_limiter_ut_improve locally)
      
         [ RUN      ] RateLimiterTest.GetTotalBytesThrough
         [       OK ] RateLimiterTest.GetTotalBytesThrough (3000 ms)
         [ RUN      ] RateLimiterTest.GetTotalRequests
         [       OK ] RateLimiterTest.GetTotalRequests (3001 ms)
         [ RUN      ] RateLimiterTest.GetTotalPendingRequests
         [       OK ] RateLimiterTest.GetTotalPendingRequests (0 ms)
         ...
         [----------] 10 tests from RateLimiterTest (43349 ms total)
      
         [----------] Global test environment tear-down
         [==========] 10 tests from 1 test case ran. (43349 ms total)
         [  PASSED  ] 10 tests.
      
         - previous (run on branch main locally)
      
         [ RUN      ] RateLimiterTest.GetTotalBytesThrough
         [       OK ] RateLimiterTest.GetTotalBytesThrough (0 ms)
         [ RUN      ] RateLimiterTest.GetTotalRequests
         [       OK ] RateLimiterTest.GetTotalRequests (0 ms)
         [ RUN      ] RateLimiterTest.GetTotalPendingRequests
         [       OK ] RateLimiterTest.GetTotalPendingRequests (0 ms)
         ...
         [----------] 10 tests from RateLimiterTest (33848 ms total)
      
        [----------] Global test environment tear-down
        [==========] 10 tests from 1 test case ran. (33848 ms total)
        [  PASSED  ] 10 tests.
      
      Reviewed By: ajkr
      
      Differential Revision: D30872544
      
      Pulled By: hx235
      
      fbshipit-source-id: ff894f5c1a4bef70e8e407d53b00be45f776b3e4
      65411b8d
  10. 17 9月, 2021 5 次提交
    • M
      Added a default Name method to Statistics (#8918) · 272cc777
      mrambacher 提交于
      Summary:
      This keeps the implementations/API backward compatible.  Implementations of Statistics will need to override this method (and be registered with the ObjectRegistry) in order to be created via CreateFromString.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8918
      
      Reviewed By: pdillinger
      
      Differential Revision: D30958916
      
      Pulled By: mrambacher
      
      fbshipit-source-id: 75b99a84e9e11fda2a9e8eff9ee1ef69a17517b2
      272cc777
    • A
      Expose blob file information through the EventListener interface (#8675) · d6aa8c49
      Akanksha Mahajan 提交于
      Summary:
      1. Extend FlushJobInfo and CompactionJobInfo with information about the blob files generated by flush/compaction jobs. This PR add two structures BlobFileInfo and BlobFileGarbageInfo that contains the required information of blob files.
       2. Notify the creation and deletion of blob files through OnBlobFileCreationStarted, OnBlobFileCreated, and OnBlobFileDeleted.
       3. Test OnFile*Finish operations notifications with Blob Files.
       4. Log the blob file creation/deletion events through EventLogger in Log file.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8675
      
      Test Plan: Add new unit tests in listener_test
      
      Reviewed By: ltamasi
      
      Differential Revision: D30412613
      
      Pulled By: akankshamahajan15
      
      fbshipit-source-id: ca51b63c6e8c8d0485a38c503572bc5a82bd5d07
      d6aa8c49
    • S
      Implement TestFSRandomAccessFile::MultiRead() (#8925) · 4f1dd05c
      sdong 提交于
      Summary:
      Right now, the failure injection test for MultiGet() is not sufficient. Improve it with TestFSRandomAccessFile::MultiRead() injecting failures.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8925
      
      Test Plan: Run crash test locally for a while.
      
      Reviewed By: anand1976
      
      Differential Revision: D31000529
      
      fbshipit-source-id: 439c7e02cf7440ac5af82deb609e202abdca3e1f
      4f1dd05c
    • J
      Add compaction priority information in RemoteCompaction (#8707) · b97c53b6
      Jay Zhuang 提交于
      Summary:
      Add compaction priority information in RemoteCompaction, which
      can be used to schedule high priority job first.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8707
      
      Test Plan: unittest
      
      Reviewed By: ajkr
      
      Differential Revision: D30548401
      
      Pulled By: jay-zhuang
      
      fbshipit-source-id: b30446511fb31b4583c49edd8565d496cf013a34
      b97c53b6
    • S
      Adjust contrun name (#8924) · 64ca0d9b
      sdong 提交于
      Summary:
      One contrun name is incorrect, which mixed error reporting with another one. Fix it.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8924
      
      Reviewed By: ltamasi
      
      Differential Revision: D30999477
      
      fbshipit-source-id: 46a04b2e4b48f755181aa9a47c353d91f1128469
      64ca0d9b
  11. 16 9月, 2021 6 次提交
    • P
      Fix flaky WALTrashCleanupOnOpen (#8917) · f4a1d106
      Peter Dillinger 提交于
      Summary:
      Test did not consider that slower deletion rate only kicks in
      after a file is deleted
      
      Fixes https://github.com/facebook/rocksdb/issues/7546
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8917
      
      Test Plan:
      no longer reproduces using
      
          buck test mode/dev //internal_repo_rocksdb/repo:db_sst_test -- --exact 'internal_repo_rocksdb/repo:db_sst_test - DBWALTestWithParam/DBWALTestWithParam.WALTrashCleanupOnOpen/0' --jobs 40 --stress-runs 600 --record-results
      
      Reviewed By: siying
      
      Differential Revision: D30949127
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 5d0607f8f548071b07410fe8f532b4618cd225e5
      f4a1d106
    • P
      Fix PrepopulateBlockCache::kFlushOnly (#8750) · 2819c784
      Peter Dillinger 提交于
      Summary:
      kFlushOnly currently means "always" except in the case of
      remote compaction. This makes it flushes only.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8750
      
      Test Plan: test updated
      
      Reviewed By: akankshamahajan15
      
      Differential Revision: D30968034
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 5dbd24dde18852a0e937a540995fba9bfbe89037
      2819c784
    • Z
      Replace Status with IOStatus in the backupable_db (#8820) · 82e7631d
      Zhichao Cao 提交于
      Summary:
      In order to populate the IOStatus up to the higher level, replace some of the Status to IOStatus.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8820
      
      Test Plan: make check
      
      Reviewed By: pdillinger
      
      Differential Revision: D30967215
      
      Pulled By: zhichao-cao
      
      fbshipit-source-id: ccf9d5cfbd9d3de047c464aaa85f9fa43b474903
      82e7631d
    • A
      Avoid overwriting first non-OK Status in db_stress setup (#8907) · 5c92aa38
      Andrew Kryczka 提交于
      Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/8907
      
      Reviewed By: zhichao-cao
      
      Differential Revision: D30922081
      
      Pulled By: ajkr
      
      fbshipit-source-id: ad7a32c21d0049342fd20c9b7f555e93674c3671
      5c92aa38
    • A
      More robust checking of IO uring completion data (#8894) · 7743f033
      anand76 提交于
      Summary:
      Potential bugs in the IO uring implementation can cause bad data to be returned in the completion queue. Add some checks in the PosixRandomAccessFile::MultiRead completion handling code to catch such errors and fail the entire MultiRead. Also log some diagnostic messages and stack trace.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8894
      
      Reviewed By: siying, pdillinger
      
      Differential Revision: D30826982
      
      Pulled By: anand1976
      
      fbshipit-source-id: af91815ac760e095d6cc0466cf8bd5c10167fd15
      7743f033
    • L
      Use the write amplification value calculated by RocksDB in benchmark.sh (#8915) · 8df33434
      Levi Tamasi 提交于
      Summary:
      Currently, `benchmark.sh` computes write amplification itself; the patch
      changes the script to use the value calculated by RocksDB (which is
      printed as part of the periodic statistics). This also has the benefit
      of being correct for BlobDB as well, since it also considers the amount
      of data written to blob files.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8915
      
      Test Plan:
      ```
      DB_DIR=/tmp/rocksdbtest/dbbench/ WAL_DIR=/tmp/rocksdbtest/dbbench/ NUM_KEYS=20000000 NUM_THREADS=32 tools/benchmark.sh overwrite --enable_blob_files=1 --enable_blob_garbage_collection=1
      
      ...
      
      ** Compaction Stats [default] **
      Level    Files   Size     Score Read(GB)  Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) Moved(GB) W-Amp Rd(MB/s) Wr(MB/s) Comp(sec) CompMergeCPU(sec) Comp(cnt) Avg(sec) KeyIn KeyDrop Rblob(GB) Wblob(GB)
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        L0      7/5   43.93 MB   0.5      0.3     0.0      0.3       0.5      0.3       0.0   1.0      1.3     59.9    201.35            101.88       109    1.847     22M   499K       0.0      11.2
        L4      4/4   244.03 MB   0.0     11.4     0.3      1.6       1.6      0.0       0.0   1.1     50.6     49.3    231.10            288.84         7   33.014    156M    26M       9.5       9.5
        L5     36/0    3.28 GB   0.0      0.0     0.0      0.0       0.0      0.0       0.0   0.0      0.0      0.0      0.00              0.00         0    0.000       0      0       0.0       0.0
       Sum     47/9    3.56 GB   0.0     11.7     0.3      1.8       2.2      0.3       0.0   2.0     27.6     54.3    432.45            390.72       116    3.728    179M    26M       9.5      20.8
       Int      0/0    0.00 KB   0.0      3.5     0.1      0.5       0.6      0.1       0.0   2.2     31.2     55.6    115.01            109.53        29    3.966     51M  7353K       2.9       5.6
      
      ...
      
      Completed overwrite (ID: ) in 289 seconds
      ops/sec	mb/sec	Size-GB	L0_GB	Sum_GB	W-Amp	W-MB/s	usec/op	p50	p75	p99	p99.9	p99.99	Uptime	Stall-time	Stall%	Test	Date	Version	Job-ID
      111784	44.8	0.0	0.5	2.2	2.0	9.2	285.9	215.3	264.4	1232	13299	23310	243	00:00:0.000	0.0	overwrite.t32.s0	2021-09-14T11:58:26.000-07:00	6.24
      ```
      
      Reviewed By: zhichao-cao
      
      Differential Revision: D30940352
      
      Pulled By: ltamasi
      
      fbshipit-source-id: ae7f5cd5440c8529788dda043266121fc2be0853
      8df33434
  12. 15 9月, 2021 2 次提交
    • S
      Always iniitalize ArenaWrappedDBIter::db_iter_ to nullptr (#8889) · 12d798ac
      sdong 提交于
      Summary:
      ArenaWrappedDBIter::db_iter_ should never be nullptr. However, when debugging a segfault, it's hard to distinguish it is not initialized (not possible) and other corruption. Add this nullptr to help distinguish the case.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8889
      
      Test Plan: Run existing unit tests.
      
      Reviewed By: pdillinger
      
      Differential Revision: D30814756
      
      fbshipit-source-id: 4b1f36896a33dc203d4f1f424ded9554927d61ba
      12d798ac
    • A
      Adapt key-value checksum for timestamp-suffixed keys (#8914) · d648cb47
      Andrew Kryczka 提交于
      Summary:
      After https://github.com/facebook/rocksdb/issues/8725, keys added to `WriteBatch` may be timestamp-suffixed, while `WriteBatch` has no awareness of the timestamp size. Therefore, `WriteBatch` can no longer calculate timestamp checksum separately from the rest of the key's checksum in all cases.
      
      This PR changes the definition of key in KV checksum to include the timestamp suffix. That way we do not need to worry about where the timestamp begins within the key. I believe the only practical effect of this change is now `AssignTimestamp()` requires recomputing the whole key checksum (`UpdateK()`) rather than just the timestamp portion (`UpdateT()`).
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8914
      
      Test Plan:
      run stress command that used to fail
      
      ```
      $ ./db_stress --batch_protection_bytes_per_key=8 -clear_column_family_one_in=0 -test_batches_snapshots=1
      ```
      
      Reviewed By: riversand963
      
      Differential Revision: D30925715
      
      Pulled By: ajkr
      
      fbshipit-source-id: c143f7ccb46c0efb390ad57ef415c250d754deff
      d648cb47