1. 19 1月, 2016 1 次提交
    • 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
  2. 16 1月, 2016 1 次提交
  3. 15 1月, 2016 3 次提交
    • G
      Guard falloc.h inclusion to avoid build breaks · aec10f73
      Gunnar Kudrjavets 提交于
      Summary: Depending on the order of include paths and versions of various headers we may end up in a situation where we'll encounter a build break caused by redefinition of constants. gcc-4.9-glibc-2.20 header update to include/bits/fcntl-linux.h introduced the definitions of FALLOC_FL_* constants. However, linux/falloc.h from kernel-headers also has FALLOC_FL_* constants defined. Therefore during the compilation we'll get "previously defined" errors.
      
      Test Plan:
      Both in the environment where the build break manifests (to make sure that the change fixed the problem) and in the environment where everything builds fine (to make sure that there are no regressions):
      
      make clean
      make -j 32
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52821
      aec10f73
    • A
      Update HISTORY.mc for 4.4.0 · f7ebc2f3
      agiardullo 提交于
      Summary: Prepare to cut release
      
      Test Plan: no code change.
      
      Reviewers: yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52827
      f7ebc2f3
    • S
      Merge pull request #947 from yuslepukhin/align_and_yield · addd9545
      Siying Dong 提交于
      Align statistics
      addd9545
  4. 14 1月, 2016 2 次提交
    • D
      Align statistics · ac50fd3a
      Dmitri Smirnov 提交于
        Use Yield macro to make it a little more portable between platforms.
      ac50fd3a
    • S
      tools/sst_dump_tool_imp.h not to depend on "util/testutil.h" · b54d4dd4
      sdong 提交于
      Summary:
      util/testutil.h doesn't seem to be used in tools/sst_dump_tool_imp.h. Remove it.
      Also move some other include to tools/sst_dump_tool.cc instead.
      
      Test Plan: Build with GCC, CLANG and with GCC 4.81 and 4.9.
      
      Reviewers: yuslepukhin, yhchiang, rven, anthony, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D52791
      b54d4dd4
  5. 13 1月, 2016 1 次提交
  6. 12 1月, 2016 3 次提交
    • I
      Reduce iterator deletion overhead · d9bca1e1
      Islam AbdelRahman 提交于
      Summary:
      After introducing Iterator::PinData(), we have extra overhead of deleting the pinned iterators that we track in a std::set
      This patch avoid inserting to the std::set if we have only one iterator (normal use case when no iterators are pinned)
      
      Before this change
      ```
      DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="newiterator" --db="/tmp/rocksdbtest-8616/dbbench" --use_existing_db --disable_auto_compactions
      newiterator  :       1.006 micros/op 994013 ops/sec;
      newiterator  :       0.994 micros/op 1006295 ops/sec;
      newiterator  :       0.990 micros/op 1010422 ops/sec;
      ```
      
      After change
      
      ```
      DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="newiterator" --db="/tmp/rocksdbtest-8616/dbbench" --use_existing_db --disable_auto_compactions
      newiterator  :       0.754 micros/op 1326588 ops/sec;
      newiterator  :       0.759 micros/op 1317394 ops/sec;
      newiterator  :       0.691 micros/op 1446704 ops/sec;
      ```
      
      Test Plan: make check -j64
      
      Reviewers: yhchiang, rven, anthony, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D52761
      d9bca1e1
    • I
      Merge pull request #940 from yuslepukhin/fix_windows_build_signed_unsigned · 45d79406
      Igor Canadi 提交于
      Fix compile error.
      45d79406
    • D
      Fix compile error. · 20d7902d
      Dmitri Smirnov 提交于
        Use constructor style initialization instead of a cast for
        simplicity.
      20d7902d
  7. 10 1月, 2016 2 次提交
  8. 09 1月, 2016 3 次提交
    • S
      Include <array> in table/plain_table_key_coding.h · df7e3b62
      sdong 提交于
      Summary: <array> is not included in table/plain_table_key_coding.h. It may be the cause of one CLANG build failure.
      
      Test Plan: Build it
      
      Reviewers: yhchiang, rven, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D52725
      df7e3b62
    • S
      Not scheduling more L1->L2 compaction if L0->L1 is pending with higher priority · 235b162b
      sdong 提交于
      Summary: When L0->L1 is pending, there may be one L1->L2 compaction going on which prevents the L0->L1 compaction from happening. If L1 needs more data to be moved to L2, then we may continue scheduling more L1->L2 compactions. The end result may be that L0->L1 compaction will not happen until L1 size drops to below target size. We can reduce the stalling because of number of L0 files by stopping schedling new L1->L2 compaction when L0's score is higher than L1.
      
      Test Plan: Run all existing tests.
      
      Reviewers: yhchiang, MarkCallaghan, rven, anthony, IslamAbdelRahman, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D52401
      235b162b
    • S
      plain table reader: non-mmap mode to keep two recent buffers · 9a8e3f73
      sdong 提交于
      Summary: In plain table reader's non-mmap mode, we only keep the most recent read buffer. However, for binary search, it is likely we come back to a location to read. To avoid one pread in such a case, we keep two read buffers. It should cover most of the cases.
      
      Test Plan:
      1. run tests
      2. check the optimization works through strace when running
      ./table_reader_bench -mmap_read=false --num_keys2=1 -num_keys1=5000 -table_factory=plain_table --iterator --through_db
      
      Reviewers: anthony, rven, kradhakrishnan, igor, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D51171
      9a8e3f73
  9. 08 1月, 2016 6 次提交
  10. 07 1月, 2016 12 次提交
    • I
      Optimize DBIter::Prev() by reducing stack overhead · 8c71eb5a
      Islam AbdelRahman 提交于
      Summary:
      It looks like we are spending significant amount of time creating std::deque<std::string> every time we do Iterator::Prev()
      
      {F921567}
      
      By using merge_operands_ as a DBIter data member w create it once and reduce this overhead and see ~30% performance improvement when using Iterator::Prev() on hot data
      
      Orignal performance
      
      ```
      DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="readreverse" --db="/dev/shm/bench_prev_opt/" --use_existing_db --disable_auto_compactions
      readreverse  :       0.713 micros/op 1402219 ops/sec;  155.1 MB/s
      readreverse  :       0.609 micros/op 1641386 ops/sec;  181.6 MB/s
      readreverse  :       0.684 micros/op 1461150 ops/sec;  161.6 MB/s
      readreverse  :       0.629 micros/op 1589842 ops/sec;  175.9 MB/s
      readreverse  :       0.647 micros/op 1544530 ops/sec;  170.9 MB/s
      ```
      
      After optimization
      
      ```
      DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="readreverse" --db="/dev/shm/bench_prev_opt/" --use_existing_db --disable_auto_compactions
      readreverse  :       0.488 micros/op 2051189 ops/sec;  226.9 MB/s
      readreverse  :       0.505 micros/op 1980892 ops/sec;  219.1 MB/s
      readreverse  :       0.541 micros/op 1846971 ops/sec;  204.3 MB/s
      readreverse  :       0.497 micros/op 2013612 ops/sec;  222.8 MB/s
      readreverse  :       0.480 micros/op 2082665 ops/sec;  230.4 MB/s
      ```
      
      Test Plan: make check -j64
      
      Reviewers: sdong, anthony, rven, igor, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: jkedgar, dhruba
      
      Differential Revision: https://reviews.facebook.net/D52563
      8c71eb5a
    • Y
      Revert "Fixed the bug when both whole_key_filtering and prefix_extractor are set." · 73c31377
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch reverts commit 57605d7e as it will
      cause BlockBasedTableTest.NoopTransformSeek test crashes in some environment.
      
      Test Plan: revert the patch
      
      Reviewers: anthony, IslamAbdelRahman, rven, kradhakrishnan, sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52623
      73c31377
    • Y
      Fixed the bug when both whole_key_filtering and prefix_extractor are set. · 57605d7e
      Yueh-Hsuan Chiang 提交于
      Summary:
      When both whole_key_filtering and prefix_extractor are set, RocksDB will
      mistakenly encode prefix + whole key into the database instead of
      simply whole key when BlockBasedTable is used.  This patch fixes this bug.
      
      Test Plan: Add a test in table_test
      
      Reviewers: anthony, IslamAbdelRahman, rven, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52233
      57605d7e
    • Y
      Add ColumnFamilyHandle::GetDescriptor() · 6935eb24
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch addes ColumnFamilyHandle::GetDescriptor(), which allows
      developers to obtain the CF options and names of the associated column
      family given its handle.
      
        // Returns the up-to-date descriptor used by the current handle.  Since it
        // returns the up-to-date information, this call might internally locks
        // and releases DB mutex to access the up-to-date CF options.
        virtual ColumnFamilyDescriptor GetDescriptor() = 0;
      
      Test Plan: augment column_family_test
      
      Reviewers: sdong, yoshinorim, IslamAbdelRahman, rven, kradhakrishnan, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D51543
      6935eb24
    • A
      fix valgrind failure in backupable_db_test · 9760c842
      agiardullo 提交于
      Summary: fix memory leak in test code
      
      Test Plan: ran test
      
      Reviewers: rven, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52617
      9760c842
    • G
      Make ldb automagically determine the file type and use the correct dumping function · b1a3b4c0
      Gunnar Kudrjavets 提交于
      Summary:
      This set of changes implements the following design: `ldb` will utilize `--path` parameter which can be used to specify a file name. Tool will then apply some heuristic to determine how to output the data properly. The design decision is not to probe the file content, but use file names to determine what dumping function to call.
      
      Usage examples:
      
      Understands that path points to a manifest file and dumps it.
      `./ldb --path=/tmp/test_db/MANIFEST-000023 dump`
      
      Understands that path points to a WAL file and dumps it.
      `./ldb --path=/tmp/test_db/000024.log dump --header`
      
      Understands that path points to a SST file and dumps it.
      `./ldb --path=/tmp/test_db/000007.sst dump`
      
      Figures out that none of the supported file types are applicable and outputs
      an appropriate error message.
      `./ldb --path=/tmp/cron.log dump`
      
      Test Plan:
      Basics:
      
      git diff
      make clean
      make -j 32 commit-prereq
      arc lint
      
      More specific testing (done as part of commit-prereq, but can be iterated separately when making isolated changes):
      
      make clean
      make ldb
      python tools/ldb_test.py
      make rocksdb_dump
      make rocksdb_undump
      sh tools/rocksdb_dump_test.sh
      
      Reviewers: rven, IslamAbdelRahman, yhchiang, kradhakrishnan, anthony, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52269
      b1a3b4c0
    • I
      Merge pull request #923 from petermattis/pmattis/prefix-may-match · ba834473
      Igor Canadi 提交于
      Fix index seeking in BlockTableReader::PrefixMayMatch.
      ba834473
    • R
      Optimize GetLatestSequenceForKey · da032495
      Reid Horuff 提交于
      Summary: DBImpl::GetLatestSequenceForKey() can do memcpy's to load a value that will never be used.  This can be optimized by changing all the Get() functions called to optionally not fetch the value (and only fetch the sequencenumber).
      
      Test Plan: optimistic_transaction_test and transaction_test
      
      Reviewers: anthony
      
      Reviewed By: anthony
      
      Subscribers: leveldb, dhruba, hermanlee4
      
      Differential Revision: https://reviews.facebook.net/D52227
      da032495
    • P
      Fix index seeking in BlockTableReader::PrefixMayMatch. · 260c2976
      Peter Mattis 提交于
      PrefixMayMatch previously seeked in the prefix index using an internal
      key with a sequence number of 0. This would cause the prefix index seek
      to fall off the end if the last key in the index had a user-key greater
      than or equal to the key being looked for. Falling off the end of the
      index in turn results in PrefixMayMatch returning false if the index is
      in memory.
      260c2976
    • I
      Fix issue #921 · e541dcc8
      Igor Canadi 提交于
      Summary:
      See a bug report here: https://github.com/facebook/rocksdb/issues/921
      The fix is to not check the shared/ directory if share_table_files is false. We could also check FileExists() before GetChildren(), but that will add extra latency when Env is Hdfs :(
      
      Test Plan: added a unit test
      
      Reviewers: rven, sdong, IslamAbdelRahman, yhchiang, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52593
      e541dcc8
    • A
      fix sporadic failure in fault_injection_test · 51adc545
      agiardullo 提交于
      Summary: Need to make sure the background task gets scheduled before it goes out of scope.
      
      Test Plan: ran test.  Will see if sporadic valgrind failures go away.
      
      Reviewers: kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52575
      51adc545
    • A
      fix potential test SleepingTask race condition · a2422f05
      agiardullo 提交于
      Summary: Make sure SleepingTask has bene run before it goes out of scope.
      
      Test Plan: run test
      
      Reviewers: kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52581
      a2422f05
  11. 06 1月, 2016 1 次提交
  12. 05 1月, 2016 5 次提交