1. 27 2月, 2016 1 次提交
  2. 24 2月, 2016 1 次提交
    • Y
      IOStatsContext::ToString() add option to exclude zero counters · 2568985a
      Yi Wu 提交于
      Summary: similar to D52809 add option to exclude zero counters.
      
      Test Plan:
      [yiwu@dev4504.prn1 ~/rocksdb] ./iostats_context_test
      [==========] Running 1 test from 1 test case.
      [----------] Global test environment set-up.
      [----------] 1 test from IOStatsContextTest
      [ RUN      ] IOStatsContextTest.ToString
      [       OK ] IOStatsContextTest.ToString (0 ms)
      [----------] 1 test from IOStatsContextTest (0 ms total)
      
      [----------] Global test environment tear-down
      [==========] 1 test from 1 test case ran. (0 ms total)
      [  PASSED  ] 1 test.
      
      Reviewers: anthony, yhchiang, andrewkr, IslamAbdelRahman, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54591
      2568985a
  3. 16 2月, 2016 1 次提交
    • J
      Separeate main from bench functionality to allow cusomizations · 7bd284c3
      Jonathan Wiepert 提交于
      Summary: Isolate db_bench functionality from main so custom benchmark code can be written and managed
      
      Test Plan:
      Tested commands
      ./build_tools/regression_build_test.sh
      ./db_bench --db=/tmp/rocksdbtest-12321/dbbench --stats_interval_seconds=1 --num=1000
      ./db_bench --db=/tmp/rocksdbtest-12321/dbbench --stats_interval_seconds=1 --num=1000 --reads=500 --writes=500
      ./db_bench --db=/tmp/rocksdbtest-12321/dbbench --stats_interval_seconds=1 --num=1000 --merge_keys=100 --numdistinct=100 --num_column_families=3 --num_hot_column_families=1
      ./db_bench --stats_interval_seconds=1 --num=1000 --bloom_locality=1 --seed=5 --threads=5
      ./db_bench --duration=60 --value_size=50 --seek_nexts=10 --reverse_iterator=true --usee_uint64_comparator=true --batch-size=5
      ./db_bench --duration=60 --value_size=50 --seek_nexts=10 --reverse_iterator=true --use_uint64_comparator=true --batch_size=5
      ./db_bench --duration=60 --value_size=50 --seek_nexts=10 --reverse_iterator=true --usee_uint64_comparator=true --batch-size=5
      
      Test Results - https://phabricator.fb.com/P56130387
      
      Additional tests for:
      ./db_bench --duration=60 --value_size=50 --seek_nexts=10 --reverse_iterator=true --use_uint64_comparator=true --batch_size=5 --key_size=8 --merge_operator=put
      ./db_bench --stats_interval_seconds=1 --num=1000 --bloom_locality=1 --seed=5 --threads=5 --merge_operator=uint64add
      
      Results: https://phabricator.fb.com/P56130607
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D53991
      7bd284c3
  4. 13 2月, 2016 2 次提交
  5. 04 2月, 2016 1 次提交
  6. 03 2月, 2016 1 次提交
    • A
      Generate tags for *.c files · 466c2c1b
      Andrew Kryczka 提交于
      Summary:
      db/c_test.c uses the functions in db/c.cc. If we have tags generated
      for one but not the other, it's easy to make mistakes like updating a function
      signature and missing a call site.
      
      Test Plan:
        $ make tags
      
      in vim:
      
        :cscope find s rocksdb_options_set_compression_options
        ...
        3    325  db/c_test.c <<main>>
                  rocksdb_options_set_compression_options(options, -14, -1, 0);
      
      Reviewers: sdong, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D53685
      466c2c1b
  7. 28 1月, 2016 1 次提交
  8. 27 1月, 2016 1 次提交
  9. 26 1月, 2016 1 次提交
    • V
      Run unit tests in parallel to find failing tests · 40911e0b
      Venkatesh Radhakrishnan 提交于
      Summary:
      Added make targets parallel_test and parallel_dbtest to run
      tests in parallel. Each test is run 32 times in parallel. There is a
      timeout to catch hangs. The test continues after a failure and reports
      non-zero status on failure
      
      Test Plan: Run the two make targets
      
      Reviewers: anthony, yhchiang, IslamAbdelRahman, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D53079
      40911e0b
  10. 22 1月, 2016 1 次提交
    • K
      Mechanism to run CI jobs on local branch via commit_prereq · b0a15e7f
      krad 提交于
      Summary: This patch provides a mechanism to run pre commit tests on the local
      branch before committing. This can help prevent frequent build breaks.
      
      The tests can be run in parallel by specifying the J=<..> environment
      variable.
      
      Test Plan: Run manually
      
      Reviewers: sdong rven tec
      
      CC: leveldb@
      
      Task ID: #9689218
      
      Blame Rev:
      b0a15e7f
  11. 21 1月, 2016 1 次提交
    • A
      Split db_test.cc (part 1: properties) · eceb5cb1
      Andrew Kryczka 提交于
      Summary:
      Moved all the tests that verify property correctness into a separate
      file. The goal is to reduce compile time and complexity of db_test. I didn't
      add parallelism for db_properties_test, even though these tests were
      parallelized in db_test, since the file is small enough that it won't matter.
      
      Some of these moves may be controversial since it's hard to say whether the
      test is "verifying property correctness," or "using properties to verify
      rocksdb's correctness." I'm interested in any opinions.
      
      Test Plan: ran db_properties_test, also waiting on "make commit-prereq -j32"
      
      Reviewers: yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52995
      eceb5cb1
  12. 19 1月, 2016 2 次提交
    • B
      Simple changes to support builds for ppc64[le] consistent with X86 · f423f05d
      bcbrock 提交于
      These simple changes are required to allow builds on ppc64[le] systems
      consistent with X86. The Makefile now recognizes both ppc64 and ppc64le, and
      in the absence of PORTABLE=1, the code will be built analogously to the X86
      -march=native.
      
      Note that although GCC supports -mcpu=native -mtune=native on POWER, it
      doesn't work correctly on all systems. This is why we need to get the actual
      machine model from the AUX vector.
      f423f05d
    • D
      Changes for build on solaris · d78c6b28
      David Bernard 提交于
      Makefile adjust paths for solaris build
      Makefile enable _GLIBCXX_USE_C99 so that std::to_string is available
      db_compaction_test.cc Initialise a variable to avoid a compilation error
      db_impl.cc Include <alloca.h>
      db_test.cc Include <alloca.h>
      Environment.java recognise solaris envrionment
      options_bulder.cc Make log unambiguous
      geodb_impl.cc Make log and floor unambiguous
      d78c6b28
  13. 31 12月, 2015 2 次提交
    • I
      Fix clang build · bae5b0a1
      Islam AbdelRahman 提交于
      Summary:
      GTEST dont compile under clang when -Werror=missing-field-initializers is set
      revert this change
      
      Test Plan:
      USE_CLANG=1 make check
      make check
      
      Reviewers: rven
      
      Reviewed By: rven
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D52455
      bae5b0a1
    • N
      use -Werror=missing-field-initializers, to closer match MyRocks build · ac16663b
      Nathan Bronson 提交于
      Summary:
      myrocks seems to build rocksdb using
      -Wmissing-field-initializers (and treats warnings as errors).  This diff
      adds that flag to the rocksdb build, and fixes the compilation failures
      that result.  I have not checked for any other differences in the build
      flags for rocksdb build as part of myrocks.
      
      Test Plan: make check
      
      Reviewers: sdong, rven
      
      Reviewed By: rven
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D52443
      ac16663b
  14. 15 12月, 2015 1 次提交
  15. 11 12月, 2015 1 次提交
    • S
      env: add EnvMirror · 2074ddd6
      Sage Weil 提交于
      This is an Env implementation that mirrors all storage-related methods on
      two different backend Env's and verifies that they return the same
      results (return status and read results).  This is useful for implementing
      a new Env and verifying its correctness.
      Signed-off-by: NSage Weil <sage@redhat.com>
      2074ddd6
  16. 09 12月, 2015 1 次提交
  17. 25 11月, 2015 1 次提交
    • N
      InlineSkipList - part 1/3 · 78812ec6
      Nathan Bronson 提交于
      Summary:
      This diff is 1/3 in a sequence that introduces a skip list optimized for
      a key that is a freshly-allocated const char*.  The diff is broken into
      pieces to make it easier to review.  This piece only introduces the new
      type by copying the existing SkipList, with mechanical naming changes
      and reformatting.
      
      Test Plan: new unit test
      
      Reviewers: igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D51279
      78812ec6
  18. 19 11月, 2015 1 次提交
    • S
      Not to build forward_iterator_bench now · c4ebb66d
      sdong 提交于
      Summary: forward_iterator_bench is not stable enough for build. Remove it for now.
      
      Test Plan: Build it with both of CLANG and non-CLANG and make sure it builds.
      
      Reviewers: rven, kradhakrishnan, anthony, yhchiang, igor, IslamAbdelRahman
      
      Reviewed By: igor, IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D50991
      c4ebb66d
  19. 18 11月, 2015 1 次提交
    • Y
      Fix Java Makefile · 4189c0f9
      Yueh-Hsuan Chiang 提交于
      Summary:
      In case rocksdb java package is built using make rocksdbjavastaticrelease, then
      only those rocksdb binary built under the virtual environments is release build.
      
      This patch fix this issue.
      
      Test Plan:
      PORTABLE=1 V=2 make rocksdbjavastaticrelease -j32
      and make sure -O2 and -NDEBUG is included when compiling all source files.
      
      Reviewers: sdong, anthony, IslamAbdelRahman, rven, kradhakrishnan, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50895
      4189c0f9
  20. 14 11月, 2015 1 次提交
    • V
      Reuse file iterators in tailing iterator when memtable is flushed · 7824444b
      Venkatesh Radhakrishnan 提交于
      Summary:
      Under a tailing workload, there were increased block cache
      misses when a memtable was flushed because we were rebuilding iterators
      in that case since the version set changed. This was exacerbated in the
      case of iterate_upper_bound, since file iterators which were over the
      iterate_upper_bound would have been deleted and are now brought back as
      part of the Rebuild, only to be deleted again. We now renew the iterators
      and only build iterators for files which are added and delete file
      iterators for files which are deleted.
      Refer to https://reviews.facebook.net/D50463 for previous version
      
      Test Plan: DBTestTailingIterator.TailingIteratorTrimSeekToNext
      
      Reviewers: anthony, IslamAbdelRahman, igor, tnovak, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: yhchiang, march, dhruba, leveldb, lovro
      
      Differential Revision: https://reviews.facebook.net/D50679
      7824444b
  21. 12 11月, 2015 1 次提交
    • Y
      Add OptionsUtil::LoadOptionsFromFile() API · e11f676e
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch adds OptionsUtil::LoadOptionsFromFile() and
      OptionsUtil::LoadLatestOptionsFromDB(), which allow developers
      to construct DBOptions and ColumnFamilyOptions from a RocksDB
      options file.  Note that most pointer-typed options such as
      merge_operator will not be constructed.
      
      With this API, developers no longer need to remember all the
      options in order to reopen an existing rocksdb instance like
      the following:
      
        DBOptions db_options;
        std::vector<std::string> cf_names;
        std::vector<ColumnFamilyOptions> cf_opts;
      
        // Load primitive-typed options from an existing DB
        OptionsUtil::LoadLatestOptionsFromDB(
            dbname, &db_options, &cf_names, &cf_opts);
      
        // Initialize necessary pointer-typed options
        cf_opts[0].merge_operator.reset(new MyMergeOperator());
        ...
      
        // Construct the vector of ColumnFamilyDescriptor
        std::vector<ColumnFamilyDescriptor> cf_descs;
        for (size_t i = 0; i < cf_opts.size(); ++i) {
          cf_descs.emplace_back(cf_names[i], cf_opts[i]);
        }
      
        // Open the DB
        DB* db = nullptr;
        std::vector<ColumnFamilyHandle*> cf_handles;
        auto s = DB::Open(db_options, dbname, cf_descs,
                          &handles, &db);
      
      Test Plan:
      Augment existing tests in column_family_test
      options_test
      db_test
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D49095
      e11f676e
  22. 11 11月, 2015 1 次提交
    • Y
      Enable RocksDB to persist Options file. · e114f0ab
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch allows rocksdb to persist options into a file on
      DB::Open, SetOptions, and Create / Drop ColumnFamily.
      Options files are created under the same directory as the rocksdb
      instance.
      
      In addition, this patch also adds a fail_if_missing_options_file in DBOptions
      that makes any function call return non-ok status when it is not able to
      persist options properly.
      
        // If true, then DB::Open / CreateColumnFamily / DropColumnFamily
        // / SetOptions will fail if options file is not detected or properly
        // persisted.
        //
        // DEFAULT: false
        bool fail_if_missing_options_file;
      
      Options file names are formatted as OPTIONS-<number>, and RocksDB
      will always keep the latest two options files.
      
      Test Plan:
      Add options_file_test.
      
      options_test
      column_family_test
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D48285
      e114f0ab
  23. 10 11月, 2015 1 次提交
    • N
      Revert "Fix TSAN build for fbcode" · 986230b8
      Nathan Bronson 提交于
      Summary:
      Reverting c745f1d2 because it
      was based on an incorrect understanding of the correct way to enable
      TSAN tests (it assumes "make COMPILE_WITH_TSAN=1 check" but in fact only
      "COMPILE_WITH_TSAN=1 make check" is supported).
      
      Test Plan: COMPILE_WITH_TSAN=1 make check
      
      Reviewers: kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50445
      986230b8
  24. 07 11月, 2015 1 次提交
    • N
      Fix TSAN build for fbcode · c745f1d2
      Nathan Bronson 提交于
      Summary:
      TSAN builds for gcc 4.9 need a PIC version of the libraries
      taken from the fbcode platform.  This is accomplished by assuming every
      .a has a _pic.a sibling, and by fixing the third-party2 zlib build.
      
      Test Plan: make COMPILE_WITH_TSAN=1 check
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50331
      c745f1d2
  25. 04 11月, 2015 1 次提交
    • Y
      Add Memory Insight support to utilities · 7d7ee2b6
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch introduces utilities/memory, which currently includes
      GetApproximateMemoryUsageByType that reports different types of
      rocksdb memory usage given a list of input DBs.
      
      The API also take care of the case where Cache could be shared
      across multiple column families / multiple db instances.
      
      Currently, it reports memory usage of memtable, table-readers
      and cache.
      
      Test Plan: utilities/memory/memory_test.cc
      
      Reviewers: igor, anthony, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D49257
      7d7ee2b6
  26. 29 10月, 2015 1 次提交
    • I
      Write stress test · 4b66d953
      Igor Canadi 提交于
      Summary:
      The goal of this diff is to create a simple stress test with focus on catching:
      * bugs in compaction/flush processes, especially the ones that cause assertion errors
      * bugs in the code that deletes obsolete files
      
      There are two parts of the test:
      * write_stress, a binary that writes to the database
      * write_stress_runner.py, a script that invokes and kills write_stress
      
      Here are some interesting parts of write_stress:
      * Runs with very high concurrency of compactions and flushes (32 threads total) and tries to create a huge amount of small files
      * The keys written to the database are not uniformly distributed -- there is a 3-character prefix that mutates occasionally (in prefix mutator thread), in such a way that the first character mutates slower than second, which mutates slower than third character. That way, the compaction stress tests some interesting compaction features like trivial moves and bottommost level calculation
      * There is a thread that creates an iterator, holds it for couple of seconds and then iterates over all keys. This is supposed to test RocksDB's abilities to keep the files alive when there are references to them.
      * Some writes trigger WAL sync. This is stress testing our WAL sync code.
      * At the end of the run, we make sure that we didn't leak any of the sst files
      
      write_stress_runner.py changes the mode in which we run write_stress and also kills and restarts it. There are some interesting characteristics:
      * At the beginning we divide the full test runtime into smaller parts -- shorter runtimes (couple of seconds) and longer runtimes (100, 1000) seconds
      * The first time we run write_stress, we destroy the old DB. Every next time during the test, we use the same DB.
      * We can run in kill mode or clean-restart mode. Kill mode kills the write_stress violently.
      * We can run in mode where delete_obsolete_files_with_fullscan is true or false
      * We can run with low_open_files mode turned on or off. When it's turned on, we configure table cache to only hold a couple of files -- that way we need to reopen files every time we access them.
      
      Another goal was to create a stress test without a lot of parameters. So tools/write_stress_runner.py should only take one parameter -- runtime_sec and it should figure out everything else on its own.
      
      In a separate diff, I'll add this new test to our nightly legocastle runs.
      
      Test Plan:
      The goal of this test was to retroactively catch the following bugs: D33045, D48201, D46899, D42399. I failed to reproduce D48201, but all others have been caught!
      
      When i reverted https://reviews.facebook.net/D33045:
      
           ./write_stress --runtime_sec=200 --low_open_files_mode=true
           Iterator statuts not OK: IO error: /fast-rocksdb-tmp/rocksdb_test/write_stress/089166.sst: No such file or directory
      
      When i reverted https://reviews.facebook.net/D42399:
      
          python tools/write_stress_runner.py --runtime_sec=5000
          Running write_stress, will kill after 5 seconds: ./write_stress --runtime_sec=-1
          Running write_stress, will kill after 2 seconds: ./write_stress --runtime_sec=-1 --destroy_db=false --delete_obsolete_files_with_fullscan=true
          Running write_stress, will kill after 7 seconds: ./write_stress --runtime_sec=-1 --destroy_db=false
          Running write_stress, will kill after 5 seconds: ./write_stress --runtime_sec=-1 --destroy_db=false
          Running write_stress, will kill after 8 seconds: ./write_stress --runtime_sec=-1 --destroy_db=false --low_open_files_mode=true
          Write to DB failed: IO error: /fast-rocksdb-tmp/rocksdb_test/write_stress/019250.sst: No such file or directory
          ERROR: write_stress died with exitcode=-6
      
      When i reverted https://reviews.facebook.net/D46899:
      
          python tools/write_stress_runner.py --runtime_sec=1000
          runtime: 1000
          Going to execute write stress for [3, 3, 100, 3, 2, 100, 1, 788]
          Running write_stress for 3 seconds: ./write_stress --runtime_sec=3 --low_open_files_mode=true
          Running write_stress for 3 seconds: ./write_stress --runtime_sec=3 --destroy_db=false --delete_obsolete_files_with_fullscan=true
          Running write_stress, will kill after 100 seconds: ./write_stress --runtime_sec=-1 --destroy_db=false --delete_obsolete_files_with_fullscan=true
          write_stress: db/db_impl.cc:2070: void rocksdb::DBImpl::MarkLogsSynced(uint64_t, bool, const rocksdb::Status&): Assertion `log.getting_synced' failed.
          ERROR: write_stress died with exitcode=-6
      
      Reviewers: IslamAbdelRahman, yhchiang, rven, kradhakrishnan, sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D49533
      4b66d953
  27. 21 10月, 2015 1 次提交
  28. 20 10月, 2015 2 次提交
    • S
      #7916298: merge tools/db_crashtest2.py into tools/db_crashtest.py · 4575de5b
      Shusen Liu 提交于
      Summary:
      merge tools/db_crashtest2.py into tools/db_crashtest.py
      
      python tools/db_crashtest.py -h  # show help message, ALL parameters can be overwrite by arguments
      
      Example usages:
      python tools/db_crashtest.py blackbox  # run blackbox with default parameters
      python tools/db_crashtest.py blackbox --simple
      python tools/db_crashtest.py whitebox  # run whitebox with default parameters
      python tools/db_crashtest.py whitebox --simple
      
      all default parameters are identical to previous version.
      
      Test Plan: `make crash_test` and make sure it can run with expected parameters pased to db_stress.
      
      Reviewers: igor, rven, anthony, IslamAbdelRahman, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D48567
      4575de5b
    • Y
      Fix the default assignment of DEBUG_LEVEL in Makefile · ec1f8354
      Yueh-Hsuan Chiang 提交于
      Summary:
      In the current make file, DEBUG_LEVEL is forced to set to 1
      instead of default to 1.  This patch fix this issue.
      
      Test Plan:
      DEBUG_LEVEL=2 make db_bench -j32
      DEBUG_LEVEL=0 make db_bench -j32
      
      DEBUG_LEVEL=0 make release -j32
      And see whether there's a warning pops up.
      
      Reviewers: MarkCallaghan, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48933
      ec1f8354
  29. 18 10月, 2015 1 次提交
  30. 16 10月, 2015 1 次提交
  31. 15 10月, 2015 2 次提交
  32. 13 10月, 2015 3 次提交
  33. 11 10月, 2015 1 次提交
    • J
      Modify the way java static builds are done so that: · 4a7970d7
      James Lent 提交于
      1) There is no need to download and install the compression libraries twice
      just to get access to their header files during the compile phase.
      2) Ensure that the compression library headers files used during the
      compile phase are the same ones used to build the static library that
      is linked into the library.
      4a7970d7