1. 29 9月, 2017 2 次提交
  2. 28 9月, 2017 3 次提交
  3. 27 9月, 2017 2 次提交
  4. 26 9月, 2017 1 次提交
  5. 23 9月, 2017 3 次提交
    • Z
      Add test kPointInTimeRecoveryCFConsistency · 1d6700f9
      Zhongyi Xie 提交于
      Summary:
      Context/problem:
      
      - CFs may be flushed at different times
      - A WAL can only be deleted after all CFs have flushed beyond end of that WAL.
      - Point-in-time recovery might stop upon reaching the first corruption.
      - Some CFs may have already flushed beyond that point, while others haven't. We should fail the Open() instead of proceeding with inconsistent CFs.
      Closes https://github.com/facebook/rocksdb/pull/2900
      
      Differential Revision: D5863281
      
      Pulled By: miasantreble
      
      fbshipit-source-id: 180dbaf83d96c804cff49b3c406312a4ae61313e
      1d6700f9
    • Y
      Fix WritePreparedTransactionTest::SeqAdvanceTest ASAN failure · be97dbb1
      Yi Wu 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/2922
      
      Differential Revision: D5895310
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 52c635a25d22478ec1eca49b6817551202babac2
      be97dbb1
    • A
      Repair DBs with trailing slash in name · 4708a687
      Andrew Kryczka 提交于
      Summary:
      Problem:
      
      - `DB::SanitizeOptions` strips trailing slash from `wal_dir` but not `dbname`
      - We check whether `wal_dir` and `dbname` refer to the same directory using string equality: https://github.com/facebook/rocksdb/blob/master/db/repair.cc#L258
      - Providing `dbname` with trailing slash causes default `wal_dir` to be misidentified as a separate directory.
      - Then the repair tries to add all SST files to the `VersionEdit` twice (once for `dbname` dir, once for `wal_dir`) and fails with coredump.
      
      Solution:
      
      - Add a new `Env` function, `AreFilesSame`, which uses device and inode number to check whether files are the same. It's currently only implemented in `PosixEnv`.
      - Migrate repair to use `AreFilesSame` to check whether `dbname` and `wal_dir` are same. If unsupported, falls back to string comparison.
      Closes https://github.com/facebook/rocksdb/pull/2827
      
      Differential Revision: D5761349
      
      Pulled By: ajkr
      
      fbshipit-source-id: c839d548678b742af1166d60b09abd94e5476238
      4708a687
  6. 22 9月, 2017 6 次提交
  7. 21 9月, 2017 1 次提交
  8. 20 9月, 2017 3 次提交
  9. 19 9月, 2017 2 次提交
    • P
      collecting kValue type tombstone · e4234fbd
      Pengchao Wang 提交于
      Summary:
      In our testing cluster, we found large amount tombstone has been promoted to kValue type from kMerge after reaching the top level of compaction. Since we used to only collecting tombstone in merge operator, those tombstones can never be collected.
      
      This PR addresses the issue by adding a GC step in compaction filter, which is only for kValue type records. Since those record already reached the top of compaction (no earlier data exists) we can safely remove them in compaction filter without worrying old data appears.
      
      This PR also removes an old optimization in cassandra merge operator for single merge operands.  We need to do GC even on a single operand, so the optimation does not make sense anymore.
      Closes https://github.com/facebook/rocksdb/pull/2855
      
      Reviewed By: sagar0
      
      Differential Revision: D5806445
      
      Pulled By: wpc
      
      fbshipit-source-id: 6eb25629d4ce917eb5e8b489f64a6aa78c7d270b
      e4234fbd
    • M
      WritePrepared Txn: Advance seq one per batch · 60beefd6
      Maysam Yabandeh 提交于
      Summary:
      By default the seq number in DB is increased once per written key. WritePrepared txns requires the seq to be increased once per the entire batch so that the seq would be used as the prepare timestamp by which the transaction is identified. Also we need to increase seq for the commit marker since it would give a unique id to the commit timestamp of transactions.
      
      Two unit tests are added to verify our understanding of how the seq should be increased. The recovery path requires much more work and is left to another patch.
      Closes https://github.com/facebook/rocksdb/pull/2885
      
      Differential Revision: D5837843
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: a08960b93d727e1cf438c254d0c2636fb133cc1c
      60beefd6
  10. 16 9月, 2017 4 次提交
  11. 15 9月, 2017 4 次提交
    • B
      JNI support for ReadOptions::iterate_upper_bound · 382277d0
      Ben Clay 提交于
      Summary:
      Plumbed ReadOptions::iterate_upper_bound through JNI.
      
      Made the following design choices:
      * Used Slice instead of AbstractSlice due to the anticipated usecase (key / key prefix). Can change this if anyone disagrees.
      * Used Slice instead of raw byte[] which seemed cleaner but necessitated the package-private handle-based Slice constructor. Followed WriteBatch as an example.
      * We need a copy constructor for ReadOptions, as we create one base ReadOptions for a particular usecase and clone -> change the iterate_upper_bound on each slice operation. Shallow copy seemed cleanest.
      * Hold a reference to the upper bound slice on ReadOptions, in contrast to Snapshot.
      
      Signed a Facebook CLA this morning.
      Closes https://github.com/facebook/rocksdb/pull/2872
      
      Differential Revision: D5824446
      
      Pulled By: sagar0
      
      fbshipit-source-id: 74fc51313a10a81ecd348625e2a50ca5b7766888
      382277d0
    • S
      Three code-level optimization to Iterator::Next() · edcbb369
      Siying Dong 提交于
      Summary:
      Three small optimizations:
      (1) iter_->IsKeyPinned() shouldn't be called if read_options.pin_data is not true. This may trigger function call all the way down the iterator tree.
      (2) reuse the iterator key object in DBIter::FindNextUserEntryInternal(). The constructor of the class has some overheads.
      (3) Move the switching direction logic in MergingIterator::Next() to a separate function.
      
      These three in total improves readseq performance by about 3% in my benchmark setting.
      Closes https://github.com/facebook/rocksdb/pull/2880
      
      Differential Revision: D5829252
      
      Pulled By: siying
      
      fbshipit-source-id: 991aea10c6d6c3b43769cb4db168db62954ad1e3
      edcbb369
    • S
      Two small refactoring for better inlining · 885b1c68
      Siying Dong 提交于
      Summary:
      Move uncommon code paths in RangeDelAggregator::ShouldDelete() and IterKey::EnlargeBufferIfNeeded() to a separate function, so that the inlined strcuture can be more optimized.
      
      Optimize it because these places show up in CPU profiling, though minimum. The performance is really hard measure. I ran db_bench with readseq benchmark against in-memory DB many times. The variation is big, but it seems to show 1% improvements.
      Closes https://github.com/facebook/rocksdb/pull/2877
      
      Differential Revision: D5828123
      
      Pulled By: siying
      
      fbshipit-source-id: 41a49e229f91e9f8409f85cc6f0dc70e31334e4b
      885b1c68
    • O
      Added save points for transactions C API · ffac6836
      Oleksandr Anyshchenko 提交于
      Summary:
      Added possibility to set save points in transactions and then rollback to them
      Closes https://github.com/facebook/rocksdb/pull/2876
      
      Differential Revision: D5825829
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 62168992340bbcddecdaea3baa2a678475d1429d
      ffac6836
  12. 14 9月, 2017 7 次提交
  13. 13 9月, 2017 2 次提交
    • G
      fix missing manual_wal_flush for DBOptions ctor · f615f560
      gladiator 提交于
      Summary:
      currently `ImmutableDBOptions::Dump` use default value for `concurrent_prepare` and `manual_wal_flush`, because DBOptions ctor does not init those member variables.
      
      so in LOG file,  it will be
      ```
                   Options.concurrent_prepare: 0
                   Options.manual_wal_flush: 0
      ```
      Closes https://github.com/facebook/rocksdb/pull/2864
      
      Differential Revision: D5816240
      
      Pulled By: ajkr
      
      fbshipit-source-id: 82335e8bcae3dceedc6a99224e7998de5fad1e50
      f615f560
    • A
      Fix naming in InternalKey · 5785b1fc
      Amy Xu 提交于
      Summary:
      - Switched all instances of SetMinPossibleForUserKey and SetMaxPossibleForUserKey in accordance to InternalKeyComparator's comparison logic
      Closes https://github.com/facebook/rocksdb/pull/2868
      
      Differential Revision: D5804152
      
      Pulled By: axxufb
      
      fbshipit-source-id: 80be35e04f2e8abc35cc64abe1fecb03af24e183
      5785b1fc