1. 21 12月, 2019 1 次提交
    • 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. 11 12月, 2019 2 次提交
    • 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
    • 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
  4. 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