1. 18 4月, 2020 1 次提交
  2. 17 4月, 2020 2 次提交
    • S
      crash_test to cover options.avoid_flush_during_recovery (#6712) · 73523bae
      sdong 提交于
      Summary:
      Options.avoid_flush_during_recovery is uncovered in crash_test. Add the coverage with a chance of 1/8, as it is a less frequently used options.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6712
      
      Test Plan: Run crash_test and see the option can be used or not used by chance.
      
      Reviewed By: ltamasi
      
      Differential Revision: D21056566
      
      fbshipit-source-id: c3b1521517cfc204786e6ef8c6acd7fffda64793
      73523bae
    • Y
      Add env_fault_injection argument to db_stress (#6687) · 5801af46
      Yueh-Hsuan Chiang 提交于
      Summary:
      Add env_fault_injection argument to db_stress.  When enabled,
      FaultInjectionTestEnv will be used instead.  Currently this
      option does not support running with other env setting.
      
      This will allow
      us to later manually produce error when running db_crashtest.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6687
      
      Test Plan:
      make db_stress -j32
      ./db_stress --env_fault_injection
      ./db_stress --env_fault_injection --hdfs   // expect error message
      
      Reviewed By: ajkr
      
      Differential Revision: D21014683
      
      Pulled By: yhchiang
      
      fbshipit-source-id: 0724aeac37efd57adb72a37defe6dbd3bfa8106a
      5801af46
  3. 16 4月, 2020 1 次提交
  4. 14 4月, 2020 1 次提交
  5. 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
  6. 25 3月, 2020 1 次提交
    • Y
      Update a few scripts to be python3 compatible (#6525) · ccf76764
      Yanqin Jin 提交于
      Summary:
      There are a few scripts with python3 compatibility issues that were not
      detected by automated tool before. Update them now.
      
      Test Plan (devserver):
      python2 tools/ldb_test.py
      python3 tools/ldb_test.py
      
      python2 tools/write_stress_runner.py --runtime_sec=30
      python3 tools/write_stress_runner.py --runtime_sec=30
      
      python2 tools/db_crashtest.py --simple --interval=2 --duration=10 blackbox
      python3 tools/db_crashtest.py --simple --interval=2 --duration=10 blackbox
      
      python2 tools/db_crashtest.py --simple --duration=10 --random_kill_odd=1000 --ops_per_thread=1000 whitebox
      python3 tools/db_crashtest.py --simple --duration=10 --random_kill_odd=1000 --ops_per_thread=1000 whitebox
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6525
      
      Reviewed By: cheng-chang
      
      Differential Revision: D20627820
      
      Pulled By: riversand963
      
      fbshipit-source-id: 4b25a7bd4d001c7f868be8b640ef876523be6ca3
      ccf76764
  7. 19 3月, 2020 1 次提交
    • L
      Remove GetSortedWalFiles/GetCurrentWalFile from the crash test (#6491) · 217ce200
      Levi Tamasi 提交于
      Summary:
      Currently, `db_stress` tests a randomly picked one of `GetLiveFiles`,
      `GetSortedWalFiles`, and `GetCurrentWalFile` with a 1/N chance when the
      command line parameter `get_live_files_and_wal_files_one_in` is specified.
      The problem is that `GetSortedWalFiles` and `GetCurrentWalFile` are unreliable
      in the sense that they can return errors if another thread removes a WAL file
      while they are executing (which is a perfectly plausible and legitimate scenario).
      The patch splits this command line parameter into three (one for each API),
      and changes the crash test script so that only `GetLiveFiles` is tested during
      our continuous crash test runs.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6491
      
      Test Plan:
      ```
      make check
      python tools/db_crashtest.py whitebox
      ```
      
      Reviewed By: siying
      
      Differential Revision: D20312200
      
      Pulled By: ltamasi
      
      fbshipit-source-id: e7c3481eddfe3bd3d5349476e34abc9eee5b7dc8
      217ce200
  8. 24 1月, 2020 1 次提交
  9. 23 1月, 2020 1 次提交
  10. 22 1月, 2020 1 次提交
    • S
      crash_test to enable block-based table hash index (#6310) · 8e309b35
      sdong 提交于
      Summary:
      Block-based table has index has been disabled in crash test due to bugs. We fixed a bug and re-enable it.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6310
      
      Test Plan: Finish one round of "crash_test_with_atomic_flush" test successfully while exclusively running has index. Another run also ran for several hours without failure.
      
      Differential Revision: D19455856
      
      fbshipit-source-id: 1192752d2c1e81ed7e5c5c7a9481c841582d5274
      8e309b35
  11. 17 1月, 2020 1 次提交
    • S
      Fix bug which causes crash_test to always run on sync mode (#6304) · 6b64aed4
      sdong 提交于
      Summary:
      A previous change meant to make db_stress to run on sync=1 mode for 1/20 of the time in crash_test, but a bug caused to to always run on sync=1 mode. Fix it.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6304
      
      Test Plan: Start and kill "python -u tools/db_crashtest.py --simple whitebox" multiple times and observe that most times sync=0 is used while some times sync=1 is used.
      
      Differential Revision: D19433000
      
      fbshipit-source-id: 7a0adba39b17a1b3acbbd791bb0cdb743b91fa95
      6b64aed4
  12. 10 1月, 2020 1 次提交
  13. 31 12月, 2019 1 次提交
  14. 24 12月, 2019 1 次提交
  15. 21 12月, 2019 4 次提交
    • 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
    • Z
      db_stress: Added the verification for GetLiveFiles, GetSortedWalFiles and GetCurrentWalFile (#6224) · f89dea4f
      Zhichao Cao 提交于
      Summary:
      Add the verification in operateDB to verify GetLiveFiles, GetSortedWalFiles and GetCurrentWalFile. The test will be called every 1 out of N, N is decided by get_live_files_and_wal_files_one_i, whose default is 1000000.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6224
      
      Test Plan: pass db_stress default run.
      
      Differential Revision: D19183358
      
      Pulled By: zhichao-cao
      
      fbshipit-source-id: 20073cf72ede77a3e0d3cf5f28304f1f605d2b1a
      f89dea4f
    • 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
  16. 20 12月, 2019 2 次提交
  17. 19 12月, 2019 2 次提交
  18. 18 12月, 2019 2 次提交
    • A
      Add VerifyChecksum() to db_stress (#6203) · 2afea297
      anand76 提交于
      Summary:
      Add an option to db_stress, verify_checksum_one_in, to call DB::VerifyChecksum() once every N ops.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6203
      
      Differential Revision: D19145753
      
      Pulled By: anand1976
      
      fbshipit-source-id: d09edf21f309ad53aa40dd25b7a563d50665fd8b
      2afea297
    • S
      crash_test: two fixes (#6200) · 9f250dd8
      sdong 提交于
      Summary:
      Fix two crash test issues:
      1. sync mode should not run with disable_wal=true
      2. disable "compaction_readahead_size" for now. With it on, some block checksum verification failure will happen in compaction paths. Not sure why, but disable it for now to keep the test clean.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6200
      
      Test Plan: Run "make crash_test" and "make crash_test_with_atomic_flush" and see it runs way longer than before the fix without failing.
      
      Differential Revision: D19143493
      
      fbshipit-source-id: 438fad52fbda60aafd142e1b65578addbe7d72b1
      9f250dd8
  19. 17 12月, 2019 1 次提交
    • 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
  20. 15 12月, 2019 1 次提交
  21. 14 12月, 2019 1 次提交
  22. 13 12月, 2019 1 次提交
  23. 12 12月, 2019 1 次提交
  24. 11 12月, 2019 2 次提交
    • 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
    • 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
  25. 28 11月, 2019 1 次提交
  26. 15 11月, 2019 1 次提交
    • S
      crash_test: use large max_manifest_file_size most of the time. (#6034) · 6123611c
      sdong 提交于
      Summary:
      Right now, crash_test always uses 16KB max_manifest_file_size value. It is good to cover logic of manifest file switch. However, information stored in manifest files might be useful in debugging failures. Switch to only use small manifest file size in 1/15 of the time.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6034
      
      Test Plan: Observe command generated by db_crash_test.py multiple times and see the --max_manifest_file_size value distribution.
      
      Differential Revision: D18513824
      
      fbshipit-source-id: 7b3ae6dbe521a0918df41064e3fa5ecbf2466e04
      6123611c
  27. 01 11月, 2019 1 次提交
    • S
      crash_test: disable periodic compaction in FIFO compaction. (#5993) · 5b656584
      sdong 提交于
      Summary:
      A recent commit make periodic compaction option valid in FIFO, which means TTL. But we fail to disable it in crash test, causing assert failure. Fix it by having it disabled.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5993
      
      Test Plan: Restart "make crash_test" many times and make sure --periodic_compaction_seconds=0 is always the case when --compaction_style=2
      
      Differential Revision: D18263223
      
      fbshipit-source-id: c91a802017d83ae89ac43827d1b0012861933814
      5b656584
  28. 31 10月, 2019 1 次提交
    • S
      crash_test: disable atomic flush with pipelined write (#5986) · 0337d87b
      sdong 提交于
      Summary:
      Recently, pipelined write is enabled even if atomic flush is enabled, which causing sanitizing failure in db_stress. Revert this change.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5986
      
      Test Plan: Run "make crash_test_with_atomic_flush" and see it to run for some while so that the old sanitizing error (which showed up quickly) doesn't show up.
      
      Differential Revision: D18228278
      
      fbshipit-source-id: 27fdf2f8e3e77068c9725a838b9bef4ab25a2553
      0337d87b
  29. 30 10月, 2019 1 次提交
    • S
      Move pipeline write waiting logic into WaitForPendingWrites() (#5716) · a3960fc8
      sdong 提交于
      Summary:
      In pipeline writing mode, memtable switching needs to wait for memtable writing to finish to make sure that when memtables are made immutable, inserts are not going to them. This is currently done in DBImpl::SwitchMemtable(). This is done after flush_scheduler_.TakeNextColumnFamily() is called to fetch the list of column families to switch. The function flush_scheduler_.TakeNextColumnFamily() itself, however, is not thread-safe when being called together with flush_scheduler_.ScheduleFlush().
      This change provides a fix, which moves the waiting logic before flush_scheduler_.TakeNextColumnFamily(). WaitForPendingWrites() is a natural place where the logic can happen.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5716
      
      Test Plan: Run all tests with ASAN and TSAN.
      
      Differential Revision: D18217658
      
      fbshipit-source-id: b9c5e765c9989645bf10afda7c5c726c3f82f6c3
      a3960fc8
  30. 15 10月, 2019 1 次提交
  31. 11 10月, 2019 1 次提交
  32. 09 10月, 2019 1 次提交