1. 11 9月, 2015 10 次提交
    • I
      Run full test suite in Travis · af7cdbf6
      Igor Canadi 提交于
      Summary: With old travis infrastructure, we couldn't run the whole test suite without crashing. Now we transfered to the new architecture and are able to run full `make check` instead of just db_test.
      
      Test Plan:
      https://travis-ci.org/facebook/rocksdb/builds/79591564
      
      This test has failed, true, but it's actual problem with tests:
      * t8316104 -- Failed ColumnFamilyTest.ReadDroppedColumnFamily and also https://github.com/facebook/rocksdb/issues/673
      * Too many open files:
      
          db/db_universal_compaction_test.cc:514: Failure
          Put(1, Key(i % num_keys), Key(i))
          IO error: /tmp/rocksdbtest-501/db_universal_compaction_prallel_test/000331.sst: Too many open files
      
      Reviewers: sdong, anthony, kradhakrishnan, IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46545
      af7cdbf6
    • A
      Removed __unused__ attribute · c25f6a85
      Andres Noetzli 提交于
      Summary:
      The current build is failing on some platforms due to an __unused__ attribute.
      This patch prevents the problem by using a pattern similar to MergeHelper
      (assert not on the variable but inside a condition that uses the variable). We
      should have better error handling in both cases in the future.
      
      Test Plan: make clean all check
      
      Reviewers: rven, anthony, yhchiang, sdong, igor, aekmekji
      
      Reviewed By: aekmekji
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46623
      c25f6a85
    • A
      Fix DBCompactionTest failure with parallel L0-L1 compactions · 6db0a939
      Ari Ekmekji 提交于
      Summary:
      The test SuggestCompactRangeNoTwoLevel0Compactions in
      DBCompactionTest fails when there are parallel L0-L1 compactions
      taking place because the test makes sure that only one compaction
      involving L0 takes place at any given time (since before having
      parallel compactions this was impossible). I changed the test to only
      run with DBOptions.max_subcompactions=1 so as to not hit this issue
      which is not a correctness issue but just an inherent changing of
      assumptions after introducing parallel compactions.
      
      This failed after landing https://reviews.facebook.net/D43269#inline-321303
      so now this should fix it
      
      Test Plan: make all && make check
      
      Reviewers: yhchiang, igor, anthony, noetzli, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D46617
      6db0a939
    • A
      Refactored common code of Builder/CompactionJob out into a CompactionIterator · 8aa1f151
      Andres Noetzli 提交于
      Summary:
      Builder and CompactionJob share a lot of fairly complex code. This patch
      refactors this code into a separate class, the CompactionIterator. Because the
      shared code is fairly complex, this patch hopefully improves maintainability.
      While there are is a lot of potential for further improvements, the patch is
      intentionally pretty close to the original structure because the change is
      already complex enough.
      
      Test Plan: make clean all check && ./db_stress
      
      Reviewers: rven, anthony, yhchiang, sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46197
      8aa1f151
    • K
      CI job improvements · 41bce058
      krad 提交于
      Summary: Added more jobs and refactored code express the jobs more cleanly
      
      Test Plan: Manual test
      
      Reviewers: igor sdong
      
      CC: leveldb@
      
      Task ID: #6968635
      
      Blame Rev:
      41bce058
    • I
      Correct ASSERT_OK() in ReadDroppedColumnFamily · 95ffc5d2
      Igor Canadi 提交于
      Summary: ReadDroppedColumnFamily is consistently failing in Travis CI environment (can't repro locally). I suspect it might be failing with non-OK status. This diff will give us more info about the failure.
      
      Test Plan: none
      
      Reviewers: sdong, kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: kradhakrishnan, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46611
      95ffc5d2
    • A
      Determine boundaries of subcompactions · 3c37b3cc
      Ari Ekmekji 提交于
      Summary:
      Up to this point, the subcompactions that make up a compaction
      job have been divided based on the key range of the L1 files, and each
      subcompaction has handled the key range of only one file. However
      DBOption.max_subcompactions allows the user to designate how many
      subcompactions at most to perform. This patch updates the
      CompactionJob::GetSubcompactionBoundaries() to determine these
      divisions accordingly based on that option and other input/system factors.
      
      The current approach orders the starting and/or ending keys of certain
      compaction input files and then generates a histogram to approximate the
      size covered by the key range between each consecutive pair of keys. Then
      it groups these ranges into groups so that the sizes are approximately equal
      to one another. The approach has also been adapted to work for universal
      compaction as well instead of just for level-based compaction as it was before.
      
      These subcompactions are then executed in parallel by locally spawning
      threads, one for each. The results are then aggregated and the compaction
      completed.
      
      Test Plan: make all && make check
      
      Reviewers: yhchiang, anthony, igor, noetzli, sdong
      
      Reviewed By: sdong
      
      Subscribers: MarkCallaghan, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43269
      3c37b3cc
    • K
      Relaxing consistency detection to include errors while inserting to memtable as WAL recovery error. · 11266440
      krad 提交于
      Summary: The current code, considers data to be consistent if the record
      checksum passes. We do have customer issues where the record checksum passed but
      the data was incomprehensible. There is no way to get out of this error case
      since all WAL recovery model will consider this error as unrelated to WAL.
      
      Relaxing the definition and including errors while inserting to memtable as WAL
      errors and handing them as per the recovery level.
      
      Test Plan: Used customer dump to verify the fix for different level. The db
      opens for kSkipAnyCorruptedRecords and kPointInTimeRecovery, but fails for
      kAbsoluteConsistency and kTolerateCorruptedTailRecords.
      
      Reviewers: sdon igor
      
      CC: leveldb@
      
      Task ID: #7918721
      
      Blame Rev:
      11266440
    • S
      Make DBTest.ReadLatencyHistogramByLevel more robust · abc7f5fd
      sdong 提交于
      Summary: DBTest.ReadLatencyHistogramByLevel was not written as expected. After writes, reads aren't guaranteed to hit data written. It was not expected. Fix it.
      
      Test Plan: Run the test multiple times
      
      Reviewers: IslamAbdelRahman, rven, anthony, kradhakrishnan, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D46587
      abc7f5fd
    • I
      Set max_open_files based on ulimit · ac9bcb55
      Igor Canadi 提交于
      Summary: We should never set max_open_files to be bigger than the system's ulimit. Otherwise we will get "Too many open files" errors. See an example in this Travis run: https://travis-ci.org/facebook/rocksdb/jobs/79591566
      
      Test Plan:
      make check
      
      I will also verify that max_max_open_files is reasonable.
      
      Reviewers: anthony, kradhakrishnan, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46551
      ac9bcb55
  2. 10 9月, 2015 10 次提交
  3. 09 9月, 2015 9 次提交
    • A
      better tuning of arena block size · b5b2b75e
      agiardullo 提交于
      Summary: Currently, if users didn't set options.arena_block_size, we set "result.arena_block_size = result.write_buffer_size / 10". It makes result.arena_block_size not a multiplier of 4KB, even if options.write_buffer_size is a multiplier of MBs. When calling malloc to arena_block_size, we may waste a small amount of memory for it. We now make the default to be /8 or /16 and align it to 4KB.
      
      Test Plan: unit tests
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46467
      b5b2b75e
    • S
      Make DBTest.OptimizeFiltersForHits more deterministic · 342ba808
      sdong 提交于
      Summary:
      This commit makes DBTest.OptimizeFiltersForHits more deterministic by:
      (1) make key inserts more random
      (2) make sure L0 has one file
      (3) make file size smaller compared to level target so L1 will cover more range.
      
      Test Plan: Run the test many times.
      
      Reviewers: rven, IslamAbdelRahman, kradhakrishnan, igor, anthony
      
      Reviewed By: anthony
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D46461
      342ba808
    • A
      Relaxed assert in forward iterator · e17e92ea
      Andres Notzli 提交于
      Summary:
      It looks like in some cases an assert in SeekInternal failed when computing the
      hints for the next level because user_key was the same as the largest key and
      not strictly smaller. Relaxing the assert to expect smaller or equal keys.
      
      Test Plan: make clean all check
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46443
      e17e92ea
    • A
      TransactionDB Custom Locking API · 5e94f68f
      agiardullo 提交于
      Summary:
      Prototype of API to allow MyRocks to override default Mutex/CondVar used by transactions with their own implementations.  They would simply need to pass their own implementations of Mutex/CondVar to the templated TransactionDB::Open().
      
      Default implementation of TransactionDBMutex/TransactionDBCondVar provided (but the code is not currently changed to use this).
      
      Let me know if this API makes sense or if it should be changed
      
      Test Plan: n/a
      
      Reviewers: yhchiang, rven, igor, sdong, spetrunia
      
      Reviewed By: spetrunia
      
      Subscribers: maykov, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43761
      5e94f68f
    • A
      Fixed broken build due to format specifier · 0ccf2db3
      Andres Notzli 提交于
      Summary:
      Clang expects %llu for uint64_t, while gcc expects %lu. Replaced the format
      specifier with a format macro. This should fix the build on gcc and Clang.
      
      Test Plan: Build on gcc and clang.
      
      Reviewers: rven, anthony, yhchiang, sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46431
      0ccf2db3
    • A
      Added Equal method to Comparator interface · 6bdc484f
      Andres Noetzli 提交于
      Summary:
      In some cases, equality comparisons can be done more efficiently than three-way
      comparisons. There are quite a few places in the code where we only care about
      equality. This patch adds an Equal() method that defaults to using the
      Compare() method.
      
      Test Plan: make clean all check
      
      Reviewers: rven, anthony, yhchiang, igor, sdong
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46233
      6bdc484f
    • A
      Tests for ManifestDumpCommand and ListColumnFamiliesCommand · 7a31960e
      Amit Arya 提交于
      Summary:
      Added tests for two LDBCommands namely i) ManifestDumpCommand and ii) ListColumnFamiliesCommand.
      + Minor fix in the sscanf formatter (along relace C cast with C++ cast) + replacing localtime with localtime_r which is thread safe.
      
      Test Plan: make all && ./tools/ldb_test.py
      
      Reviewers: anthony, igor, IslamAbdelRahman, kradhakrishnan, lgalanis, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D45819
      7a31960e
    • K
      Adding email notification. · 778cf444
      krad 提交于
      Summary: The email notifications needs to be at command level and the job level.
      Adding command level notification.
      
      Test Plan: Run command manually
      
      Reviewers: igor sdong
      
      CC: leveldb@
      
      Task ID: #6968635
      
      Blame Rev:
      778cf444
    • A
      Fixed comparison in ForwardIterator when computing hint for GetNextLevelIndex() · 3a0df7f1
      Andres Noetzli 提交于
      Summary: When computing the hint for GetNextLevelIndex(), ForwardIterator was doing a redundant comparison. This patch fixes the comparison (using https://github.com/facebook/rocksdb/blob/master/db/version_set.cc#L158 as a reference) and moves it inside an assert because we expect `level_files[f_idx]` to contain the next key after Seek(), so user_key should always be smaller than the largest key.
      
      Test Plan: make clean all check
      
      Reviewers: rven, anthony, yhchiang, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: tnovak, sdong, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46227
      3a0df7f1
  4. 05 9月, 2015 1 次提交
  5. 04 9月, 2015 5 次提交
  6. 03 9月, 2015 5 次提交
    • A
      Add SetLockTimeout for Transactions · 0f1aab6c
      agiardullo 提交于
      Summary: MyRocks wants to be able to change the lock timeout of a transaction that has already started.  Expose existing SetLockTimeout function to users.
      
      Test Plan: unit test
      
      Reviewers: spetrunia, rven, sdong, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D45987
      0f1aab6c
    • I
      Fix compile · 14456aea
      Igor Canadi 提交于
      Summary: There was a merge conflict with https://reviews.facebook.net/D45993
      
      Test Plan: make check
      
      Reviewers: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46065
      14456aea
    • I
      Optimize bloom filter cache misses · 76f286cc
      Igor Canadi 提交于
      Summary:
      This optimizes the case when (cache_index_and_filter_blocks=1) and bloom filter is not present in the cache.
      
      Previously we did:
      1. Read meta block from file
      2. Read the filter position from the meta block
      3. Read the filter
      
      Now, we pre-load the filter position on Table::Open(), so we can skip steps (1) and (2) on bloom filter cache miss. Instead of 2 IOs, we do only 1.
      
      Test Plan: make check
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46047
      76f286cc
    • Y
      Fixed a compile warning in rocksjni/loggerjnicallback.cc · 0e6e5472
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch fixes the following compile warning.
          java/rocksjni/loggerjnicallback.cc: In constructor ‘rocksdb::LoggerJniCallback::LoggerJniCallback(JNIEnv*, jobject)’:
          java/rocksjni/loggerjnicallback.cc:19:14: warning: unused variable ‘rs’ [-Wunused-variable]
             const jint rs = env->GetJavaVM(&m_jvm);
                        ^
      
      Test Plan: make rocksdbjavastaticrelease
      
      Reviewers: sdong, anthony, IslamAbdelRahman, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D45981
      0e6e5472
    • K
      Adding commands for few more CI jobs. · b8a962d4
      krad 提交于
      Summary: Added commands to spawn crash, stress, asan, asan_crash, clang CI jobs
      
      Test Plan: Manual test
      
      Reviewers: sdong
      
      CC: leveldb@
      
      Task ID: #6968635
      
      Blame Rev:
      b8a962d4