1. 21 12月, 2019 3 次提交
    • Y
      Remove an unnecessary check before running db_stress (#6231) · c4fd9cf4
      Yanqin Jin 提交于
      Summary:
      As title. We can run non-cf-consistency stress tests with verify_db_one_in>0,
      thus remove the check added previously.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6231
      
      Test Plan:
      ```
      make crash_test
      ```
      
      Differential Revision: D19198295
      
      Pulled By: riversand963
      
      fbshipit-source-id: e874c701bb03ab76eaab00f059dd4032bb2f537f
      c4fd9cf4
    • L
      Support BlobDB in db_stress (#6230) · 786c3d45
      Levi Tamasi 提交于
      Summary:
      The patch adds support for BlobDB to `db_stress`. Note that BlobDB currently does
      not support (amongst other features) Column Families or the `SingleDelete` API,
      so for now, those should be disabled on the command line when running `db_stress` in
      BlobDB mode (using `-column_families=1` and `-nooverwritepercent=0`,
      respectively). Also, some BlobDB features that do not go well with the verification logic
      in `db_stress` like TTL and FIFO eviction are not supported currently.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6230
      
      Test Plan:
      ```
      ./db_stress -max_key=100000 -use_blob_db -column_families=1 -nooverwritepercent=0 -reopen=1 -blob_db_file_size=1000000 -target_file_size_base=1000000 -blob_db_enable_gc -blob_db_gc_cutoff=0.1 -blob_db_min_blob_size=10 -blob_db_bytes_per_sync=16384
      ```
      
      Differential Revision: D19191476
      
      Pulled By: ltamasi
      
      fbshipit-source-id: 35840452af8c5e6095249c7fd9a53a119a0985fc
      786c3d45
    • Y
      Add more verification to db_stress (#6173) · 670a916d
      Yanqin Jin 提交于
      Summary:
      Currently, db_stress performs verification by calling `VerifyDb()` at the end of test and optionally before tests start. In case of corruption or incorrect result, it will be too late. This PR adds more verification in two ways.
      1. For cf consistency test, each test thread takes a snapshot and verifies every N ops. N is configurable via `-verify_db_one_in`. This option is not supported in other stress tests.
      2. For cf consistency test, we use another background thread in which a secondary instance periodically tails the primary (interval is configurable). We verify the secondary. Once an error is detected, we terminate the test and report. This does not affect other stress tests.
      
      Test plan (devserver)
      ```
      $./db_stress -test_cf_consistency -verify_db_one_in=0 -ops_per_thread=100000 -continuous_verification_interval=100
      $./db_stress -test_cf_consistency -verify_db_one_in=1000 -ops_per_thread=10000 -continuous_verification_interval=0
      $make crash_test
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6173
      
      Differential Revision: D19047367
      
      Pulled By: riversand963
      
      fbshipit-source-id: aeed584ad71f9310c111445f34975e5ab47a0615
      670a916d
  2. 20 12月, 2019 1 次提交
  3. 18 12月, 2019 1 次提交
  4. 17 12月, 2019 4 次提交
    • M
      Wait for CancelAllBackgroundWork before Close in db stress (#6191) · 68d5d82d
      Maysam Yabandeh 提交于
      Summary:
      In https://github.com/facebook/rocksdb/issues/6174 we fixed the stress test to respect the CancelAllBackgroundWork + Close order for WritePrepared transactions. The fix missed to take into account that some invocation of CancelAllBackgroundWork are with wait=false parameter which essentially breaks the order.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6191
      
      Differential Revision: D19102709
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: f4e7b5fdae47ff1c1ac284ba1cf67d5d3f3d03eb
      68d5d82d
    • S
      Add some new options to crash_test (#6176) · bcc372c0
      sdong 提交于
      Summary:
      Several options are trivially added to crash test and random values are picked.
      Made simple test run non-dynamic level and normal test run dynamic level.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6176
      
      Test Plan: Run crash_test and watch the printing
      
      Differential Revision: D19053955
      
      fbshipit-source-id: 958cb43c968541ebd87ed4d91e778bd1d40e7502
      bcc372c0
    • S
      db_stress: preserve all historic manifest files (#6142) · 35126dd8
      sdong 提交于
      Summary:
      compaction history is stored in manifest files. Preserve all of them in db_stress would help debugging.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6142
      
      Test Plan: Run db_stress and observe that manifest files are preserved. Run whole crash_test and see how DB directory looks like.
      
      Differential Revision: D19047026
      
      fbshipit-source-id: f83c3e0bb5332b1b4768be5dcee56a24f9b760a9
      35126dd8
    • Z
      db_stress: generate the key based on Zipfian distribution (hot key) (#6163) · fbda25f5
      Zhichao Cao 提交于
      Summary:
      In the current db_stress, all the keys are generated randomly and follows the uniform distribution. In order to test some corner cases that some key are always updated or read, we need to generate the key based on other distributions. In this PR, the key is generated based on Zipfian distribution and the skewness can be controlled by setting hot_key_alpha (0.8 to 1.5 is suggested). The larger hot_key_alpha is, the more skewed will be. Not that, usually, if hot_key_alpha is larger than 2, there might be only 1 or 2 keys that are generated. If hot_key_alpha is 0, it generate the key follows uniform distribution (random key)
      
      Testing plan: pass the db_stress and printed the keys to make sure it follows the distribution.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6163
      
      Differential Revision: D18978480
      
      Pulled By: zhichao-cao
      
      fbshipit-source-id: e123b4865477f7478e83fb581f9576bada334680
      fbda25f5
  5. 15 12月, 2019 1 次提交
  6. 14 12月, 2019 4 次提交
  7. 13 12月, 2019 1 次提交
  8. 11 12月, 2019 6 次提交
    • Y
      Add SyncWAL to db_stress (#6149) · 383f5071
      Yanqin Jin 提交于
      Summary:
      Add SyncWAL to db_stress. Specify with `-sync_wal_one_in=N` so that it will be
      called once every N operations on average.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6149
      
      Test Plan:
      ```
      $make db_stress
      $./db_stress -sync_wal_one_in=100 -ops_per_thread=100000
      ```
      
      Differential Revision: D18922529
      
      Pulled By: riversand963
      
      fbshipit-source-id: 4c0b8cb8fa21852722cffd957deddf688f12ea56
      383f5071
    • S
      db_stress: sometimes call CancelAllBackgroundWork() and Close() before closing DB (#6141) · 7a99162a
      sdong 提交于
      Summary:
      CancelAllBackgroundWork() and Close() are frequently used features but we don't cover it in stress test. Simply execute them before closing the DB with 1/2 chance.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6141
      
      Test Plan: Run "db_stress".
      
      Differential Revision: D18900861
      
      fbshipit-source-id: 49b46ccfae120d0f9de3e0543b82fb6d715949d0
      7a99162a
    • P
      Add PauseBackgroundWork() to db_stress (#6148) · a6538571
      Peter Dillinger 提交于
      Summary:
      Worker thread will occasionally call PauseBackgroundWork(),
      briefly sleep (to avoid stalling itself) and then call
      ContinueBackgroundWork().
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6148
      
      Test Plan:
      some running of 'make blackbox_crash_test' with temporary
      printf output to confirm code occasionally reached.
      
      Differential Revision: D18913886
      
      Pulled By: pdillinger
      
      fbshipit-source-id: ae9356a803390929f3165dfb6a00194692ba92be
      a6538571
    • A
      Add an option to the CMake build to disable building shared libraries (#6122) · 2bb5fc12
      Adam Simpkins 提交于
      Summary:
      Add an option to explicitly disable building shared versions of the
      RocksDB libraries.  The shared libraries cannot be built in cases where
      some dependencies are only available as static libraries.  This allows
      still building RocksDB in these situations.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6122
      
      Differential Revision: D18920740
      
      fbshipit-source-id: d24f66d93c68a1e65635e6e0b663bae62c903bca
      2bb5fc12
    • S
      db_stress: sometimes validate compact range data (#6140) · 14c38bac
      sdong 提交于
      Summary:
      Right now, in db_stress, compact range is simply executed without any immediate data validation. Add a simply validation which compares hash for all keys within the compact range to stay the same against the same snapshot before and after the compaction.
      
      Also, randomly tune most knobs of CompactRangeOptions.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6140
      
      Test Plan: Run db_stress with "--compact_range_one_in=2000 --compact_range_width=100000000" for a while. Manually ingest some hacky code and observe the error path.
      
      Differential Revision: D18900230
      
      fbshipit-source-id: d96e75bc8c38dd5ec702571ffe7cf5f4ea93ee10
      14c38bac
    • P
      Vary bloom_bits in db_crashtest (#6103) · 6380df5e
      Peter Dillinger 提交于
      Summary:
      Especially with non-integral bits/key now supported,
      db_crashtest should vary the bloom_bits configuration. The probabilities
      look like this:
      
      1/2 chance of a uniform int from 0 to 19. This includes overall 1/40
      chance of 0 which disables the bloom filter.
      
      1/2 chance of a float from a lognormal distribution with a median of 10.
      This always produces positive values but with a decent chance of < 1
      (overall ~1/40) or > 100 (overall ~1/40), the enforced/coerced
      implementation limits.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6103
      
      Test Plan:
      start 'make blackbox_crash_test' several times and look at
      configuration output
      
      Differential Revision: D18734877
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 4a38cb057d3b3fc1327f93199f65b9a9ffbd7316
      6380df5e
  9. 10 12月, 2019 1 次提交
  10. 09 12月, 2019 1 次提交
    • S
      Break db_stress_tool.cc to a list of source files (#6134) · 7d79b326
      sdong 提交于
      Summary:
      db_stress_tool.cc now is a giant file. In order to main it easier to improve and maintain, break it down to multiple source files.
      Most classes are turned into their own files. Separate .h and .cc files are created for gflag definiations. Another .h and .cc files are created for some common functions. Some test execution logic that is only loosely related to class StressTest is moved to db_stress_driver.h and db_stress_driver.cc. All the files are located under db_stress_tool/. The directory name is created as such because if we end it with either stress or test, .gitignore will ignore any file under it and makes it prone to issues in developements.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6134
      
      Test Plan: Build under GCC7 with and without LITE on using GNU Make. Build with GCC 4.8. Build with cmake with -DWITH_TOOL=1
      
      Differential Revision: D18876064
      
      fbshipit-source-id: b25d0a7451840f31ac0f5ebb0068785f783fdf7d
      7d79b326