1. 16 9月, 2017 2 次提交
  2. 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
  3. 14 9月, 2017 7 次提交
  4. 13 9月, 2017 8 次提交
    • 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
    • B
      Use cmake TIMESTAMP function · 82860bd5
      Bernhard M. Wiedemann 提交于
      Summary:
      because it is not only platform independent
      but also allows to override the build date
      This helps to make ceph builds reproducible (that includes a fork of rockdb in a submodule)
      
      Also adds UTC flag, to be independent of timezone.
      
      Requires cmake-2.8.11+ from 2013
      Closes https://github.com/facebook/rocksdb/pull/2848
      
      Differential Revision: D5820189
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: e3e8c1550e10e238c173f6c5d9ba15f71ad3ce28
      82860bd5
    • M
      Exclude incompatible options in test · 2d30aaae
      Maysam Yabandeh 提交于
      Summary:
      options.enable_pipelined_write and options.concurrent_prepare are incompatible and should not be set together.
      Closes https://github.com/facebook/rocksdb/pull/2875
      
      Differential Revision: D5818358
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: dad862508f00817ab302f8b61729accf38315fb8
      2d30aaae
    • A
      support opening zero backups during engine init · f5148ade
      Andrew Kryczka 提交于
      Summary:
      There are internal users who open BackupEngine for writing new backups only, and they don't care whether old backups can be read or not. The condition `BackupableDBOptions::max_valid_backups_to_open == 0` should be supported (previously in df74b775 I made the mistake of choosing 0 as a special value to disable the limit).
      Closes https://github.com/facebook/rocksdb/pull/2819
      
      Differential Revision: D5751599
      
      Pulled By: ajkr
      
      fbshipit-source-id: e73ac19eb5d756d6b68601eae8e43407ee4f2752
      f5148ade
    • A
      do not call merge when checking to see if key exists · 3c428077
      Archit Mishra 提交于
      Summary:
      Changes:
      * added check for value before merge is called on code path that should check if key exists
      Closes https://github.com/facebook/rocksdb/pull/2814
      
      Reviewed By: IslamAbdelRahman
      
      Differential Revision: D5743966
      
      Pulled By: armishra
      
      fbshipit-source-id: 6ac4283bc510c8ca50827d87ef0ba631f2b33b18
      3c428077
    • A
      speedup DBTest.EncodeDecompressedBlockSizeTest · 025b85b4
      Andrew Kryczka 提交于
      Summary:
      it sometimes takes more than 10 minutes (i.e., times out) on our internal CI. mainly because bzip is super slow. so I reduced the amount of  work it tries to do.
      Closes https://github.com/facebook/rocksdb/pull/2856
      
      Differential Revision: D5795883
      
      Pulled By: ajkr
      
      fbshipit-source-id: e69f986ae60b44ecc26b6b024abd0f13bdf3a3c5
      025b85b4
    • Z
      Add iterator's SeekForPrev functionality to the java-api · 044a71e2
      zawlazaw 提交于
      Summary:
      As discussed in #2742 , this pull-requests brings the iterator's [SeekForPrev()](https://github.com/facebook/rocksdb/wiki/SeekForPrev) functionality to the java-api. It affects all locations in the code where previously only Seek() was supported.
      
      All code changes are essentially a copy & paste of the already existing implementations for Seek().
      **Please Note**: the changes to the C++ code were applied without fully understanding its effect, so please take a closer look. However, since Seek() and SeekForPrev() provide exactly the same signature, I do not expect any mistake here.
      
      The java-tests are extended by new tests for the additional functionality.
      
      Compilation (`make rocksdbjavastatic`) and test (`java/make test`) run without errors.
      Closes https://github.com/facebook/rocksdb/pull/2747
      
      Differential Revision: D5721011
      
      Pulled By: sagar0
      
      fbshipit-source-id: c1f951cddc321592c70dd2d32bc04892f3f119f8
      044a71e2
  5. 12 9月, 2017 4 次提交
    • S
      Make InternalKeyComparator final and directly use it in merging iterator · 64b6452e
      Siying Dong 提交于
      Summary:
      Merging iterator invokes InternalKeyComparator.Compare() frequently to heap merge. By making InternalKeyComparator final and merging iterator to directly use InternalKeyComparator rather than through Iterator interface, we can give compiler a choice to avoid one more virtual function call if possible. I ran readseq benchmark in memory-only use case to make sure the performance at least doesn't regress.
      
      I have to disable the final key word in debug build, as a hack test class depends on overriding the class.
      Closes https://github.com/facebook/rocksdb/pull/2860
      
      Differential Revision: D5800461
      
      Pulled By: siying
      
      fbshipit-source-id: ab876f22a09bb5c560740911412336e0e25ccb53
      64b6452e
    • S
      Make DBIter class final · 2dd22e54
      Siying Dong 提交于
      Summary:
      DBIter is referenced in ArenaWrappedDBIter, which is a simple wrapper. If DBIter is final, some virtual function call can be avoided. Some functions can even be inlined, like DBIter.value() to ArenaWrappedDBIter.value() and DBIter.key() to ArenaWrappedDBIter.key(). The performance gain is hard to measure. I just ran the memory-only benchmark for readseq and saw it didn't regress. There shouldn't be any harm doing it. Just give compiler more choices.
      Closes https://github.com/facebook/rocksdb/pull/2859
      
      Differential Revision: D5799888
      
      Pulled By: siying
      
      fbshipit-source-id: 829788f91310c40282dcfb7e412e6ef489931143
      2dd22e54
    • H
      Fix missing BYTES_PER_WRITE for pipeline write · 2a591504
      Huachao Huang 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/2862
      
      Differential Revision: D5805638
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 72d38c74395690023a719f400daff01527645a17
      2a591504
    • M
      write-prepared txn: call IsInSnapshot · f46464d3
      Maysam Yabandeh 提交于
      Summary:
      This patch instruments the read path to verify each read value against an optional ReadCallback class. If the value is rejected, the reader moves on to the next value. The WritePreparedTxn makes use of this feature to skip sequence numbers that are not in the read snapshot.
      Closes https://github.com/facebook/rocksdb/pull/2850
      
      Differential Revision: D5787375
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: 49d808b3062ab35e7ae98ad388f659757794184c
      f46464d3
  6. 09 9月, 2017 3 次提交
  7. 08 9月, 2017 4 次提交
    • A
      rename stall-related internal stats · 3cd7ea2e
      Andrew Kryczka 提交于
      Summary:
      Some of these names, like `MEMTABLE_COMPACTION`, did not mean anything. Tried to give them descriptive names.
      Closes https://github.com/facebook/rocksdb/pull/2852
      
      Differential Revision: D5782822
      
      Pulled By: ajkr
      
      fbshipit-source-id: f2695c4124af4073da4492d7135bae2411220f3a
      3cd7ea2e
    • S
      Fix CLANG Analyze · 0e99323a
      Siying Dong 提交于
      Summary:
      clang analyze shows warnings after we upgrade the CLANG version. Fix them.
      Closes https://github.com/facebook/rocksdb/pull/2839
      
      Differential Revision: D5769060
      
      Pulled By: siying
      
      fbshipit-source-id: 3f8e4df715590d8984f6564b608fa08cfdfa5f14
      0e99323a
    • K
      specify SSE42 'target' attribute for Fast_CRC32() · ba3c58ca
      Kefu Chai 提交于
      Summary:
      if we enable SSE42 globally when compiling the tree for preparing a
      portable binary, which could be running on CPU w/o SSE42 instructions
      even the GCC on the building host is able to emit SSE42 code, this leads
      to illegal instruction errors on machines not supporting SSE42. to solve
      this problem, crc32 detects the supported instruction at runtime, and
      selects the supported CRC32 implementation according to the result of
      `cpuid`. but intrinics like "_mm_crc32_u64()" will not be available
      unless the "target" machine is appropriately specified in the command
      line, like "-msse42", or using the "target" attribute.
      
      we could pass "-msse42" only when compiling crc32c.cc, and allow the
      compiler to generate the SSE42 instructions, but we are still at the
      risk of executing illegal instructions on machines does not support
      SSE42 if the compiler emits code that is not guarded by our runtime
      detection. and we need to do the change in both Makefile and CMakefile.
      
      or, we can use GCC's "target" attribute to enable the machine specific
      instructions on certain function. in this way, we have finer grained
      control of the used "target". and no need to change the makefiles. so
      we don't need to duplicate the changes on both makefile and cmake as
      the previous approach.
      
      this problem surfaces when preparing a package for GNU/Linux distribution,
      and we only applies to optimization for SSE42, so using a feature
      only available on GCC/Clang is not that formidable.
      Closes https://github.com/facebook/rocksdb/pull/2807
      
      Differential Revision: D5786084
      
      Pulled By: siying
      
      fbshipit-source-id: bca5c0f877b8d6fb55f58f8f122254a26422843d
      ba3c58ca
    • M
      Remove unused TransactionCallback · 7e19a571
      Maysam Yabandeh 提交于
      Summary:
      TransactionCallback was never used. Remove it to avoid confusion.
      Closes https://github.com/facebook/rocksdb/pull/2853
      
      Differential Revision: D5787219
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: e2b6a89537e3770a269ad38be71c4b0b160a88ac
      7e19a571
  8. 07 9月, 2017 1 次提交
  9. 06 9月, 2017 1 次提交
  10. 02 9月, 2017 4 次提交
  11. 01 9月, 2017 2 次提交