1. 11 4月, 2020 1 次提交
    • A
      Fault injection in db_stress (#6538) · 5c19a441
      anand76 提交于
      Summary:
      This PR implements a fault injection mechanism for injecting errors in reads in db_stress. The FaultInjectionTestFS is used for this purpose. A thread local structure is used to track the errors, so that each db_stress thread can independently enable/disable error injection and verify observed errors against expected errors. This is initially enabled only for Get and MultiGet, but can be extended to iterator as well once its proven stable.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6538
      
      Test Plan:
      crash_test
      make check
      
      Reviewed By: riversand963
      
      Differential Revision: D20714347
      
      Pulled By: anand1976
      
      fbshipit-source-id: d7598321d4a2d72bda0ced57411a337a91d87dc7
      5c19a441
  2. 21 2月, 2020 1 次提交
    • S
      Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) · fdf882de
      sdong 提交于
      Summary:
      When dynamically linking two binaries together, different builds of RocksDB from two sources might cause errors. To provide a tool for user to solve the problem, the RocksDB namespace is changed to a flag which can be overridden in build time.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6433
      
      Test Plan: Build release, all and jtest. Try to build with ROCKSDB_NAMESPACE with another flag.
      
      Differential Revision: D19977691
      
      fbshipit-source-id: aa7f2d0972e1c31d75339ac48478f34f6cfcfb3e
      fdf882de
  3. 10 1月, 2020 1 次提交
  4. 04 1月, 2020 1 次提交
  5. 03 1月, 2020 1 次提交
  6. 25 12月, 2019 1 次提交
    • P
      Fix a clang analyzer report, and 'analyze' make rule (#6244) · 95d226d8
      Peter Dillinger 提交于
      Summary:
      Clang analyzer was falsely reporting on use of txn=nullptr.
      Added a new const variable so that it can properly prune impossible
      control flows.
      
      Also, 'make analyze' previously required setting USE_CLANG=1 as an
      environment variable, not a make variable, or else compilation errors
      like
      
      g++: error: unrecognized command line option ‘-Wshorten-64-to-32’
      
      Now USE_CLANG is not required for 'make analyze' (it's implied) and you
      can do an incremental analysis (recompile what has changed) with
      'USE_CLANG=1 make analyze_incremental'
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6244
      
      Test Plan: 'make -j24 analyze', 'make crash_test'
      
      Differential Revision: D19225950
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 14f4039aa552228826a2de62b2671450e0fed3cb
      95d226d8
  7. 24 12月, 2019 1 次提交
  8. 22 12月, 2019 1 次提交
    • P
      Disable occasionally failing assertion in TestPrefixScan (#6238) · 5f559897
      Peter Dillinger 提交于
      Summary:
      Seeing crash test failures like
      
      db_stress: db_stress_tool/no_batched_ops_stress.cc:271: virtual
      rocksdb::Status
      rocksdb::NonBatchedOpsStressTest::TestPrefixScan(rocksdb::ThreadState*,
      const rocksdb::ReadOptions&, const std::vector<int>&, const
      std::vector<long int>&): Assertion `count <=
      GetPrefixKeyCount(prefix.ToString(), upper_bound)' failed.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6238
      
      Differential Revision: D19210312
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 4d2c35c38f418b408e01c7ba22adf6983ae67d44
      5f559897
  9. 21 12月, 2019 4 次提交
    • A
      Add Transaction::MultiGet to db_stress (#6227) · d4da4128
      anand76 提交于
      Summary:
      Call Transaction::MultiGet from TestMultiGet() in db_stress. We add some Puts/Merges/Deletes into the transaction in order to exercise MultiGetFromBatchAndDB. There is no data verification on read, just check status. There is currently no read data verification in db_stress as it requires synchronization with writes. It needs to be tackled separately.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6227
      
      Test Plan: make crash_test_with_txn
      
      Differential Revision: D19204611
      
      Pulled By: anand1976
      
      fbshipit-source-id: 770d0e30d002e88626c264c58103f1d709bb060c
      d4da4128
    • A
      Generate variable length keys in db_stress (#6165) · 3160edfd
      anand76 提交于
      Summary:
      Currently, db_stress generates fixed length keys of 8 bytes. This patch adds the ability to generate variable length keys. Most of the db_stress code continues to work with a numeric key randomly generated, and the numeric key also acts as an index into the values_ array. The numeric key is mapped to a variable length string key in a deterministic way. Furthermore, the ordering is preserved.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6165
      
      Test Plan: run make crash_test
      
      Differential Revision: D19204646
      
      Pulled By: anand1976
      
      fbshipit-source-id: d2d46a96615b4832a8be2a981f5913905f0e1ca7
      3160edfd
    • S
      crash_test to cover bottommost compression and some other changes (#6215) · 338c149b
      sdong 提交于
      Summary:
      Several improvements to crash_test/stress_test:
      (1) Stress_test to support an parameter of bottommost compression
      (2) Rename those FLAGS_* variables that are not gflags to avoid confusion
      (3) Crash_test to randomly generate compression type for bottommost compression with half the chance.
      (4) Stress_test to sanitize unsupported compression type to snappy, so that crash_test to cover all possible compression types and people don't need to worry about they don't support all comrpession types in their environment.
      (5) In crash_test, when generating db_stress command, sort arguments in alphabeta order, so that it is easier to find value for a specific argument.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6215
      
      Test Plan: Run "make crash_test" for a while and see the botommost option shown in LOG files.
      
      Differential Revision: D19171255
      
      fbshipit-source-id: d7001e246c4ff9ee5760776eea0be97738650735
      338c149b
    • 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
  10. 14 12月, 2019 1 次提交
  11. 10 12月, 2019 1 次提交
  12. 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