1. 07 1月, 2016 9 次提交
    • 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
  2. 06 1月, 2016 1 次提交
  3. 05 1月, 2016 7 次提交
  4. 31 12月, 2015 6 次提交
  5. 30 12月, 2015 5 次提交
  6. 29 12月, 2015 7 次提交
  7. 27 12月, 2015 2 次提交
  8. 26 12月, 2015 2 次提交
    • N
      support for concurrent adds to memtable · 7d87f027
      Nathan Bronson 提交于
      Summary:
      This diff adds support for concurrent adds to the skiplist memtable
      implementations.  Memory allocation is made thread-safe by the addition of
      a spinlock, with small per-core buffers to avoid contention.  Concurrent
      memtable writes are made via an additional method and don't impose a
      performance overhead on the non-concurrent case, so parallelism can be
      selected on a per-batch basis.
      
      Write thread synchronization is an increasing bottleneck for higher levels
      of concurrency, so this diff adds --enable_write_thread_adaptive_yield
      (default off).  This feature causes threads joining a write batch
      group to spin for a short time (default 100 usec) using sched_yield,
      rather than going to sleep on a mutex.  If the timing of the yield calls
      indicates that another thread has actually run during the yield then
      spinning is avoided.  This option improves performance for concurrent
      situations even without parallel adds, although it has the potential to
      increase CPU usage (and the heuristic adaptation is not yet mature).
      
      Parallel writes are not currently compatible with
      inplace updates, update callbacks, or delete filtering.
      Enable it with --allow_concurrent_memtable_write (and
      --enable_write_thread_adaptive_yield).  Parallel memtable writes
      are performance neutral when there is no actual parallelism, and in
      my experiments (SSD server-class Linux and varying contention and key
      sizes for fillrandom) they are always a performance win when there is
      more than one thread.
      
      Statistics are updated earlier in the write path, dropping the number
      of DB mutex acquisitions from 2 to 1 for almost all cases.
      
      This diff was motivated and inspired by Yahoo's cLSM work.  It is more
      conservative than cLSM: RocksDB's write batch group leader role is
      preserved (along with all of the existing flush and write throttling
      logic) and concurrent writers are blocked until all memtable insertions
      have completed and the sequence number has been advanced, to preserve
      linearizability.
      
      My test config is "db_bench -benchmarks=fillrandom -threads=$T
      -batch_size=1 -memtablerep=skip_list -value_size=100 --num=1000000/$T
      -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
      --block_size=16384 --allow_concurrent_memtable_write" on a two-socket
      Xeon E5-2660 @ 2.2Ghz with lots of memory and an SSD hard drive.  With 1
      thread I get ~440Kops/sec.  Peak performance for 1 socket (numactl
      -N1) is slightly more than 1Mops/sec, at 16 threads.  Peak performance
      across both sockets happens at 30 threads, and is ~900Kops/sec, although
      with fewer threads there is less performance loss when the system has
      background work.
      
      Test Plan:
      1. concurrent stress tests for InlineSkipList and DynamicBloom
      2. make clean; make check
      3. make clean; DISABLE_JEMALLOC=1 make valgrind_check; valgrind db_bench
      4. make clean; COMPILE_WITH_TSAN=1 make all check; db_bench
      5. make clean; COMPILE_WITH_ASAN=1 make all check; db_bench
      6. make clean; OPT=-DROCKSDB_LITE make check
      7. verify no perf regressions when disabled
      
      Reviewers: igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: MarkCallaghan, IslamAbdelRahman, anthony, yhchiang, rven, sdong, guyg8, kradhakrishnan, dhruba
      
      Differential Revision: https://reviews.facebook.net/D50589
      7d87f027
    • S
      DBTest.HardLimit use special memtable · 5b2587b5
      sdong 提交于
      Summary: DBTest.HardLimit fails in appveyor build. Use special mem table to make the test behavior depends less on platform
      
      Test Plan: Run the test with JEMALLOC both on and off.
      
      Reviewers: yhchiang, kradhakrishnan, rven, anthony, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D52317
      5b2587b5
  9. 25 12月, 2015 1 次提交