1. 14 12月, 2018 1 次提交
  2. 03 10月, 2018 1 次提交
    • Y
      Check for compression lib support before test exec (#4443) · 4e58b2ea
      Yanqin Jin 提交于
      Summary:
      Before running CompactFilesTest.SentinelCompressionType, we should check
      whether zlib and snappy are supported.
      
      CompactFilesTest.SentinelCompressionType is a newly added test. Compilation and
      linking with different options, e.g. COMPILE_WITH_TSAN, COMPILE_WITH_ASAN, etc.
      lead to generation of different binaries. On the one hand, it's not clear why
      zlib or snappy is present under ASAN, but not under TSAN. On the other hand,
      changing the compilation flags for TSAN or ASAN seems a bigger change worth much
      more attention. To unblock the cont-runs, I suggest that we simply add these
      two checks at the beginning of the test, as we did for
      GeneralTableTest.ApproximateOffsetOfCompressed in table/table_test.cc.
      
      Future actions include invesigating the absence of zlib and snappy when
      compiling with TSAN, i.e. COMPILE_WITH_TSAN=1, if necessary.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4443
      
      Differential Revision: D10140935
      
      Pulled By: riversand963
      
      fbshipit-source-id: 62f96d1e685386accd2ef0b98f6f754d3fd67b3e
      4e58b2ea
  3. 01 10月, 2018 1 次提交
  4. 14 7月, 2018 1 次提交
    • M
      Per-thread unique test db names (#4135) · 8581a93a
      Maysam Yabandeh 提交于
      Summary:
      The patch makes sure that two parallel test threads will operate on different db paths. This enables using open source tools such as gtest-parallel to run the tests of a file in parallel.
      Example: ``` ~/gtest-parallel/gtest-parallel ./table_test```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4135
      
      Differential Revision: D8846653
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: 799bad1abb260e3d346bcb680d2ae207a852ba84
      8581a93a
  5. 16 4月, 2018 1 次提交
  6. 06 3月, 2018 1 次提交
  7. 23 2月, 2018 2 次提交
  8. 22 7月, 2017 2 次提交
  9. 16 7月, 2017 1 次提交
  10. 28 4月, 2017 1 次提交
  11. 07 2月, 2017 1 次提交
    • D
      Windows thread · 0a4cdde5
      Dmitri Smirnov 提交于
      Summary:
      introduce new methods into a public threadpool interface,
      - allow submission of std::functions as they allow greater flexibility.
      - add Joining methods to the implementation to join scheduled and submitted jobs with
        an option to cancel jobs that did not start executing.
      - Remove ugly `#ifdefs` between pthread and std implementation, make it uniform.
      - introduce pimpl for a drop in replacement of the implementation
      - Introduce rocksdb::port::Thread typedef which is a replacement for std::thread.  On Posix Thread defaults as before std::thread.
      - Implement WindowsThread that allocates memory in a more controllable manner than windows std::thread with a replaceable implementation.
      - should be no functionality changes.
      Closes https://github.com/facebook/rocksdb/pull/1823
      
      Differential Revision: D4492902
      
      Pulled By: siying
      
      fbshipit-source-id: c74cb11
      0a4cdde5
  12. 26 1月, 2017 1 次提交
  13. 20 10月, 2016 1 次提交
  14. 27 9月, 2016 1 次提交
  15. 24 9月, 2016 1 次提交
    • A
      not cut compaction output when compact to level 0 · c2a62a4c
      Aaron Gao 提交于
      Summary: we should not call ShouldStopBefore() in compaction when the compaction targets level 0. Otherwise, CheckConsistency will fail the assertion of seq number check on level 0.
      
      Test Plan:
      make all check -j64
      I also manully test that using db_bench to compact files to level 0. Without this line change, the assertion files and multiple files are generated on level 0 after compaction.
      
      Reviewers: yhchiang, andrewkr, yiwu, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D64269
      c2a62a4c
  16. 04 8月, 2016 1 次提交
    • O
      Fix flaky test `ObsoleteFiles` · c3a4bea5
      omegaga 提交于
      Summary: The test `ObsoleteFiles` failed occasionally on slow device. This problem appears on Travis CI several times. The reason is that we did not wait until compaction jobs are finished in the test, while in slower device the background jobs take longer time to finish.
      
      Test Plan: Pass existing tests.
      
      Reviewers: yiwu, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61479
      c3a4bea5
  17. 23 2月, 2016 1 次提交
    • M
      Fixed CompactFiles() spuriously failing or corrupting DB · eef63ef8
      Mike Kolupaev 提交于
      Summary:
      We started getting two kinds of crashes since we started using `DB::CompactFiles()`:
      (1) `CompactFiles()` fails saying something like "/data/logdevice/4440/shard12/012302.sst: No such file or directory", and presumably makes DB read-only,
      (2) DB fails to open saying "Corruption: Can't access /267000.sst: IO error: /data/logdevice/4440/shard1/267000.sst: No such file or directory".
      
      AFAICT, both can be explained by background thread deleting compaction output as "obsolete" while it's being written, before it's committed to manifest. If it ends up committed to the manifest, we get (2); if compaction notices the disappearance and fails, we get (1). The internal tasks t10068021 and t10134177 have some details about the investigation that led to this.
      
      Test Plan: `make -j check`; the new test fails to reopen the DB without the fix
      
      Reviewers: yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, sdong
      
      Differential Revision: https://reviews.facebook.net/D54561
      eef63ef8
  18. 10 2月, 2016 1 次提交
  19. 27 1月, 2016 1 次提交
    • Y
      Fix an ASAN error in compact_files_test · 955ecf8b
      Yueh-Hsuan Chiang 提交于
      Summary:
      compact_files_test enables SyncPoint but never disable it before
      the test terminates.  As a result, it might cause heap-use-after-free
      error when some code path trying to access the static variable of
      SyncPoint when it has already gone out of scope after the main thread
      dies.
      
      Test Plan:
      COMPILE_WITH_ASAN=1 make compact_files_test -j32
      ./compact_files_test
      
      Reviewers: sdong, anthony, kradhakrishnan, rven, andrewkr, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D53379
      955ecf8b
  20. 14 11月, 2015 1 次提交
  21. 21 7月, 2015 2 次提交
    • A
      Improved FileExists API · 06429408
      agiardullo 提交于
      Summary: Add new CheckFileExists method.  Considered changing the FileExists api but didn't want to break anyone's builds.
      
      Test Plan: unit tests
      
      Reviewers: yhchiang, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D42003
      06429408
    • I
      Skip unsupported tests in ROCKSDB_LITE · aa8ac644
      Islam AbdelRahman 提交于
      Summary:
      Skipping these tests in ROCKSDB_LITE since they are not supported
      json_document_test
      wal_manager_test
      ttl_test
      sst_dump_test
      deletefile_test
      compact_files_test
      prefix_test
      checkpoint_test
      
      Test Plan:
      json_document_test
      wal_manager_test
      ttl_test
      sst_dump_test
      deletefile_test
      compact_files_test
      prefix_test
      checkpoint_test
      
      Reviewers: igor, sdong, yhchiang, kradhakrishnan, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D42573
      aa8ac644
  22. 10 6月, 2015 1 次提交
    • S
      Make "make all" work for CYGWIN · e409d3d7
      sdong 提交于
      Summary: Some test and benchmark codes don't build for CYGWIN. Fix it.
      
      Test Plan: Build "make all" with TARGET_OS=Cygwin on cygwin and make sure it passes.
      
      Reviewers: rven, yhchiang, anthony, igor, kradhakrishnan
      
      Reviewed By: igor, kradhakrishnan
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D39711
      e409d3d7
  23. 06 6月, 2015 1 次提交
  24. 18 3月, 2015 1 次提交
    • I
      rocksdb: switch to gtest · b4b69e4f
      Igor Sugak 提交于
      Summary:
      Our existing test notation is very similar to what is used in gtest. It makes it easy to adopt what is different.
      In this diff I modify existing [[ https://code.google.com/p/googletest/wiki/Primer#Test_Fixtures:_Using_the_Same_Data_Configuration_for_Multiple_Te | test fixture ]] classes to inherit from `testing::Test`. Also for unit tests that use fixture class, `TEST` is replaced with `TEST_F` as required in gtest.
      
      There are several custom `main` functions in our existing tests. To make this transition easier, I modify all `main` functions to fallow gtest notation. But eventually we can remove them and use implementation of `main` that gtest provides.
      
      ```lang=bash
      % cat ~/transform
      #!/bin/sh
      files=$(git ls-files '*test\.cc')
      for file in $files
      do
        if grep -q "rocksdb::test::RunAllTests()" $file
        then
          if grep -Eq '^class \w+Test {' $file
          then
            perl -pi -e 's/^(class \w+Test) {/${1}: public testing::Test {/g' $file
            perl -pi -e 's/^(TEST)/${1}_F/g' $file
          fi
          perl -pi -e 's/(int main.*\{)/${1}::testing::InitGoogleTest(&argc, argv);/g' $file
          perl -pi -e 's/rocksdb::test::RunAllTests/RUN_ALL_TESTS/g' $file
        fi
      done
      % sh ~/transform
      % make format
      ```
      
      Second iteration of this diff contains only scripted changes.
      
      Third iteration contains manual changes to fix last errors and make it compilable.
      
      Test Plan:
      Build and notice no errors.
      ```lang=bash
      % USE_CLANG=1 make check -j55
      ```
      Tests are still testing.
      
      Reviewers: meyering, sdong, rven, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D35157
      b4b69e4f
  25. 12 3月, 2015 1 次提交