1. 17 11月, 2015 10 次提交
  2. 14 11月, 2015 2 次提交
    • 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
    • V
      Make sure that CompactFiles does not run two parallel Level 0 compactions · 2ae4d7d7
      Venkatesh Radhakrishnan 提交于
      Summary:
      Since level 0 files can overlap, two level 0 compactions cannot
      run in parallel. Compact files needs to check this before running a
      compaction.
      
      Test Plan: CompactFilesTest.L0ConflictsFiles
      
      Reviewers: igor, IslamAbdelRahman, anthony, sdong, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50079
      2ae4d7d7
  3. 13 11月, 2015 7 次提交
    • Y
      Add CheckOptionsCompatibility() API to options_util · d781da81
      Yueh-Hsuan Chiang 提交于
      Summary:
      Add CheckOptionsCompatibility() API to options_util that returns
      Status::OK if the input DBOptions and ColumnFamilyDescriptors
      are compatible with the latest options stored in the specified DB path.
      
      Test Plan: Added tests in options_util_test
      
      Reviewers: igor, anthony, IslamAbdelRahman, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50649
      d781da81
    • S
      Merge pull request #824 from yuslepukhin/try_ci_tests_on_daily · 2391b459
      Siying Dong 提交于
      Try running db_test during integration build
      2391b459
    • Y
      Fix a build break so tests can run · 2ab3e2df
      yuslepukhin 提交于
      2ab3e2df
    • Y
      Merge branch 'master' into try_ci_tests_on_daily · 247c49a4
      yuslepukhin 提交于
      247c49a4
    • Y
      Run tests imporvements · 935d1495
      yuslepukhin 提交于
        Add sequential rerun for any failed tests. Add env_test case.
        Limit concurrency
        Allow to specify individual tests
        Take $Limit into account when displaying number of tests
      935d1495
    • Y
      Fixed valgrind error in options_util_test · 5ac16300
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed valgrind error in options_util_test by deleting the
      compaction_filter allocated from RandomInitCFOptions().
      
      Test Plan: valgrind --error-exitcode=2 --leak-check=full ./options_util_test
      
      Reviewers: anthony, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50661
      5ac16300
    • N
      Don't merge WriteBatch-es if WAL is disabled · 6ce42dd0
      Nathan Bronson 提交于
      Summary:
      There's no need for WriteImpl to flatten the write batch group
      into a single WriteBatch if the WAL is disabled.  This diff moves the
      flattening into the WAL step, and skips flattening entirely if it isn't
      needed.  It's good for about 5% speedup on a multi-threaded workload
      with no WAL.
      
      This diff also adds clarifying comments about the chance for partial
      failure of WriteBatchInternal::InsertInto, and always sets bg_error_ if
      the memtable state diverges from the logged state or if a WriteBatch
      succeeds only partially.
      
      Benchmark for speedup:
        db_bench -benchmarks=fillrandom -threads=16 -batch_size=1 -memtablerep=skip_list -value_size=0 --num=200000 -level0_slowdown_writes_trigger=9999 -level0_stop_writes_trigger=9999 -disable_auto_compactions --max_write_buffer_number=8 -max_background_flushes=8 --disable_wal --write_buffer_size=160000000
      
      Test Plan: asserts + make check
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50583
      6ce42dd0
  4. 12 11月, 2015 2 次提交
    • Y
      Fixed DBCompactionTest.SkipStatsUpdateTest · 56245ddc
      Yueh-Hsuan Chiang 提交于
      Summary:
      DBCompactionTest.SkipStatsUpdateTest relies on the number
      of files opened during the DB::Open process, but the persisting
      options file support altered this number and thus makes
      DBCompactionTest.SkipStatsUpdateTest in certain environment.
      
      This patch fixed this test failure.
      
      Test Plan: db_compaction_test
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50637
      56245ddc
    • 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
  5. 11 11月, 2015 10 次提交
    • Y
      Fixed build failure of RocksDBLite test on options_file_test.cc · e78389b5
      Yueh-Hsuan Chiang 提交于
      Summary: Fixed build failure of RocksDBLite test
      
      Test Plan: options_file_test
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50595
      e78389b5
    • 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
    • S
      Merge pull request #823 from yuslepukhin/fix_off_t_type · 7ed2c3e4
      Siying Dong 提交于
      Make use of portable `uint64_t` type to make possible 64-bit file access
      7ed2c3e4
    • D
      Make CI build debug/optimized · 7f59e33b
      Dmitri Smirnov 提交于
      7f59e33b
    • D
      Try running db_test during integration build · ae2dfe40
      Dmitri Smirnov 提交于
      ae2dfe40
    • D
    • D
      Make use of portable `uint64_t` type to make possible file access · 5270b33b
      Dmitri Smirnov 提交于
        in 64-bit.
      
        Currently, a signed off_t type is being used for the following
        interfaces for both offset and the length in bytes:
        * `Allocate`
        * `RangeSync`
      
        On Linux `off_t` is automatically either 32 or 64-bit depending on
        the platform. On Windows it is always a 32-bit signed long which
        limits file access and in particular space pre-allocation
        to effectively 2 Gb.
      
        Proposal is to replace off_t with uint64_t as a portable type
        always access files with 64-bit interfaces.
      
        May need to modify posix code but lack resources to test it.
      5270b33b
    • N
      track WriteBatch contents · 631863c6
      Nathan Bronson 提交于
      Summary:
      Parallel writes will only be possible for certain combinations of
      flags and WriteBatch contents.  Traversing the WriteBatch at write time
      to check these conditions would be expensive, but it is very cheap to
      keep track of when building WriteBatch-es.  When loading WriteBatch-es
      during recovery, a deferred computation state is used so that the flags
      never need to be computed.
      
      Test Plan:
      1. add asserts and EXPECT_EQ-s
      2. make check
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50337
      631863c6
    • N
      remove constexpr from util/random.h for MSVC compat · 505accda
      Nathan Bronson 提交于
      Summary:
      Scoped anonymous enums seem to be better supported than static
      constexpr at the moment, so this diff replaces the latter with the former.
      Also, this diff removes an incorrect inclusion of pthread.h.  MSVC build
      was broken starting with D50439.
      
      Test Plan:
      1. build
      2. observe proper skiplist behavior by absence of pathological slowdown
      3. push diff to tmp_try_windows branch to tickle AppVeyor
      4. wait for contbuild before committing to master
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50517
      505accda
    • D
      Make use of portable `uint64_t` type to make possible file access · 5421c972
      Dmitri Smirnov 提交于
        in 64-bit.
      
        Currently, a signed off_t type is being used for the following
        interfaces for both offset and the length in bytes:
        * `Allocate`
        * `RangeSync`
      
        On Linux `off_t` is automatically either 32 or 64-bit depending on
        the platform. On Windows it is always a 32-bit signed long which
        limits file access and in particular space pre-allocation
        to effectively 2 Gb.
      
        Proposal is to replace off_t with uint64_t as a portable type
        always access files with 64-bit interfaces.
      
        May need to modify posix code but lack resources to test it.
      5421c972
  6. 10 11月, 2015 3 次提交
    • N
      Switch to thread-local random for skiplist · b81b4309
      Nathan Bronson 提交于
      Summary:
      Using a TLS random instance for skiplist makes it smaller
      (useful for hash_skiplist_rep) and prepares skiplist for concurrent
      adds.  This diff also modifies the branching factor math to avoid an
      unnecessary division.
      
      This diff has the effect of changing the sequence of skip list node
      height choices made by tests, so it has the potential to cause unit
      test failures for tests that implicitly rely on the exact structure
      of the skip list.  Tests that try to exactly trigger a compaction are
      likely suspects for this problem (these tests have always been brittle to
      changes in the skiplist details).  I've minimizes this risk by reseeding
      the main thread's Random at the beginning of each test, increasing the
      universal compaction size_ratio limit from 101% to 105% for some tests,
      and verifying that the tests pass many times.
      
      Test Plan: for i in `seq 0 9`; do make check; done
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50439
      b81b4309
    • I
      Merge pull request #821 from yuslepukhin/continue_windows_warnings · 75a8bad2
      Islam AbdelRahman 提交于
      Enable C4200, C4702, C4305 windows warnings
      75a8bad2
    • 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
  7. 09 11月, 2015 1 次提交
  8. 07 11月, 2015 5 次提交