1. 11 11月, 2015 2 次提交
    • Y
      Enable RocksDB to persist Options file. · e114f0ab
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch allows rocksdb to persist options into a file on
      DB::Open, SetOptions, and Create / Drop ColumnFamily.
      Options files are created under the same directory as the rocksdb
      instance.
      
      In addition, this patch also adds a fail_if_missing_options_file in DBOptions
      that makes any function call return non-ok status when it is not able to
      persist options properly.
      
        // If true, then DB::Open / CreateColumnFamily / DropColumnFamily
        // / SetOptions will fail if options file is not detected or properly
        // persisted.
        //
        // DEFAULT: false
        bool fail_if_missing_options_file;
      
      Options file names are formatted as OPTIONS-<number>, and RocksDB
      will always keep the latest two options files.
      
      Test Plan:
      Add options_file_test.
      
      options_test
      column_family_test
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D48285
      e114f0ab
    • N
      track WriteBatch contents · 631863c6
      Nathan Bronson 提交于
      Summary:
      Parallel writes will only be possible for certain combinations of
      flags and WriteBatch contents.  Traversing the WriteBatch at write time
      to check these conditions would be expensive, but it is very cheap to
      keep track of when building WriteBatch-es.  When loading WriteBatch-es
      during recovery, a deferred computation state is used so that the flags
      never need to be computed.
      
      Test Plan:
      1. add asserts and EXPECT_EQ-s
      2. make check
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50337
      631863c6
  2. 10 11月, 2015 1 次提交
    • N
      Switch to thread-local random for skiplist · b81b4309
      Nathan Bronson 提交于
      Summary:
      Using a TLS random instance for skiplist makes it smaller
      (useful for hash_skiplist_rep) and prepares skiplist for concurrent
      adds.  This diff also modifies the branching factor math to avoid an
      unnecessary division.
      
      This diff has the effect of changing the sequence of skip list node
      height choices made by tests, so it has the potential to cause unit
      test failures for tests that implicitly rely on the exact structure
      of the skip list.  Tests that try to exactly trigger a compaction are
      likely suspects for this problem (these tests have always been brittle to
      changes in the skiplist details).  I've minimizes this risk by reseeding
      the main thread's Random at the beginning of each test, increasing the
      universal compaction size_ratio limit from 101% to 105% for some tests,
      and verifying that the tests pass many times.
      
      Test Plan: for i in `seq 0 9`; do make check; done
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50439
      b81b4309
  3. 07 11月, 2015 2 次提交
    • D
      Enable Windows warnings C4307 C4309 C4512 C4701 · 20f57b17
      Dmitri Smirnov 提交于
        Enable C4307 'operator' : integral constant overflow
        Longs and ints on Windows are 32-bit hence the overflow
        Enable C4309 'conversion' : truncation of constant value
        Enable C4512 'class' : assignment operator could not be generated
        Enable C4701 Potentially uninitialized local variable 'name' used
      20f57b17
    • N
      incorrect batch group size computation for write throttling · 2b42000f
      Nathan Bronson 提交于
      Summary:
      When a write batch can't join a batch group due to the total
      size of the contained batches, the write controller's GetDelay is passed
      a size value that includes the rejected batch.
      
      Test Plan: make check
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50343
      2b42000f
  4. 06 11月, 2015 2 次提交
    • V
      Fix regression failure in PrefixTest.PrefixValid · ae7940b6
      Venkatesh Radhakrishnan 提交于
      Summary: Use IterKey to store prefix_start_ so that it doesn't get freed
      
      Test Plan: PrefixTest.PrefixValid
      
      Reviewers: anthony, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50289
      ae7940b6
    • V
      Prefix-based iterating only shows keys in prefix · 9d50afc3
      Venkatesh Radhakrishnan 提交于
      Summary:
      MyRocks testing found an issue that while iterating over keys
      that are outside the prefix, sometimes wrong results were seen for keys
      outside the prefix. We now tighten the range of keys seen with a new
      read option called prefix_seen_at_start. This remembers the starting
      prefix and then compares it on a Next for equality of prefix. If they
      are from a different prefix, it sets valid to false.
      
      Test Plan: PrefixTest.PrefixValid
      
      Reviewers: IslamAbdelRahman, sdong, yhchiang, anthony
      
      Reviewed By: anthony
      
      Subscribers: spetrunia, hermanlee4, yoshinorim, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50211
      9d50afc3
  5. 04 11月, 2015 2 次提交
    • Y
      Add Memory Insight support to utilities · 7d7ee2b6
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch introduces utilities/memory, which currently includes
      GetApproximateMemoryUsageByType that reports different types of
      rocksdb memory usage given a list of input DBs.
      
      The API also take care of the case where Cache could be shared
      across multiple column families / multiple db instances.
      
      Currently, it reports memory usage of memtable, table-readers
      and cache.
      
      Test Plan: utilities/memory/memory_test.cc
      
      Reviewers: igor, anthony, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D49257
      7d7ee2b6
    • Y
      Add GetAggregatedIntProperty(): returns the aggregated value from all CFs · 3ecbab00
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch adds GetAggregatedIntProperty() that returns the aggregated
      value from all CFs
      
      Test Plan: Added a test in db_test
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman, rven
      
      Reviewed By: rven
      
      Subscribers: rven, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D49497
      3ecbab00
  6. 03 11月, 2015 1 次提交
    • B
      Fix introduced in 2ab7065a was reverted by 18285c1e. · affd8336
      Brent Garber 提交于
      Corrects:
      
      db/memtablerep_bench.cc:135:22: error: ‘FLAGS_env’ defined but not used [-Werror=unused-variable]
       static rocksdb::Env* FLAGS_env = rocksdb::Env::Default();
                            ^
      cc1plus: all warnings being treated as errors
      Makefile:1147: recipe for target 'db/memtablerep_bench.o' failed
      affd8336
  7. 31 10月, 2015 4 次提交
  8. 30 10月, 2015 4 次提交
  9. 29 10月, 2015 1 次提交
  10. 28 10月, 2015 1 次提交
    • D
      Implement smart buffer management. · 6fbc4f9f
      Dmitri Smirnov 提交于
        introduce a new DBOption random_access_max_buffer_size to limit
        the size of the random access buffer used for unbuffered access.
        Implement read ahead buffering when enabled.
        To that effect propagate compaction_readahead_size and the new option
        to the env options to make it available for the implementation.
        Add Hint() override so SetupForCompaction() call would call Hint()
        readahead can now be setup from both Hint() and EnableReadAhead()
        Add new option random_access_max_buffer_size support
        db_bench, options_helper to make it string parsable
        and the unit test.
      6fbc4f9f
  11. 27 10月, 2015 1 次提交
  12. 23 10月, 2015 1 次提交
  13. 21 10月, 2015 1 次提交
  14. 20 10月, 2015 8 次提交
  15. 19 10月, 2015 8 次提交
  16. 18 10月, 2015 1 次提交