rocksdb/db_stress_tool
Yanqin Jin 670a916d01 Add more verification to db_stress (#6173)
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
2019-12-20 08:49:29 -08:00
..
batched_ops_stress.cc cmake: do not build tests for Release build and cleanups (#5916) 2019-12-13 12:48:06 -08:00
cf_consistency_stress.cc Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
CMakeLists.txt Add an option to the CMake build to disable building shared libraries (#6122) 2019-12-10 15:20:50 -08:00
db_stress_common.cc Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
db_stress_common.h Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
db_stress_driver.cc Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
db_stress_driver.h Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_env_wrapper.h db_stress: preserve all historic manifest files (#6142) 2019-12-16 14:32:34 -08:00
db_stress_gflags.cc Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
db_stress_listener.h Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_shared_state.cc Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
db_stress_shared_state.h Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
db_stress_stat.h Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
db_stress_test_base.cc Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
db_stress_test_base.h Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
db_stress_tool.cc Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00
db_stress.cc Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00
no_batched_ops_stress.cc Add more verification to db_stress (#6173) 2019-12-20 08:49:29 -08:00