1. 11 11月, 2015 7 次提交
    • 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
    • S
      Merge pull request #823 from yuslepukhin/fix_off_t_type · 7ed2c3e4
      Siying Dong 提交于
      Make use of portable `uint64_t` type to make possible 64-bit file access
      7ed2c3e4
    • D
    • D
      Make use of portable `uint64_t` type to make possible file access · 5270b33b
      Dmitri Smirnov 提交于
        in 64-bit.
      
        Currently, a signed off_t type is being used for the following
        interfaces for both offset and the length in bytes:
        * `Allocate`
        * `RangeSync`
      
        On Linux `off_t` is automatically either 32 or 64-bit depending on
        the platform. On Windows it is always a 32-bit signed long which
        limits file access and in particular space pre-allocation
        to effectively 2 Gb.
      
        Proposal is to replace off_t with uint64_t as a portable type
        always access files with 64-bit interfaces.
      
        May need to modify posix code but lack resources to test it.
      5270b33b
    • 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
    • N
      remove constexpr from util/random.h for MSVC compat · 505accda
      Nathan Bronson 提交于
      Summary:
      Scoped anonymous enums seem to be better supported than static
      constexpr at the moment, so this diff replaces the latter with the former.
      Also, this diff removes an incorrect inclusion of pthread.h.  MSVC build
      was broken starting with D50439.
      
      Test Plan:
      1. build
      2. observe proper skiplist behavior by absence of pathological slowdown
      3. push diff to tmp_try_windows branch to tickle AppVeyor
      4. wait for contbuild before committing to master
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50517
      505accda
    • D
      Make use of portable `uint64_t` type to make possible file access · 5421c972
      Dmitri Smirnov 提交于
        in 64-bit.
      
        Currently, a signed off_t type is being used for the following
        interfaces for both offset and the length in bytes:
        * `Allocate`
        * `RangeSync`
      
        On Linux `off_t` is automatically either 32 or 64-bit depending on
        the platform. On Windows it is always a 32-bit signed long which
        limits file access and in particular space pre-allocation
        to effectively 2 Gb.
      
        Proposal is to replace off_t with uint64_t as a portable type
        always access files with 64-bit interfaces.
      
        May need to modify posix code but lack resources to test it.
      5421c972
  2. 10 11月, 2015 3 次提交
    • 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
    • I
      Merge pull request #821 from yuslepukhin/continue_windows_warnings · 75a8bad2
      Islam AbdelRahman 提交于
      Enable C4200, C4702, C4305 windows warnings
      75a8bad2
    • N
      Revert "Fix TSAN build for fbcode" · 986230b8
      Nathan Bronson 提交于
      Summary:
      Reverting c745f1d2 because it
      was based on an incorrect understanding of the correct way to enable
      TSAN tests (it assumes "make COMPILE_WITH_TSAN=1 check" but in fact only
      "COMPILE_WITH_TSAN=1 make check" is supported).
      
      Test Plan: COMPILE_WITH_TSAN=1 make check
      
      Reviewers: kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50445
      986230b8
  3. 09 11月, 2015 1 次提交
  4. 07 11月, 2015 9 次提交
  5. 06 11月, 2015 7 次提交
    • A
      Document SingleDelete · fe789c5f
      agiardullo 提交于
      Summary: Docuemented what is currently supported by SingleDelete based on its current implementation.
      
      Test Plan: n/a
      
      Reviewers: sdong, kradhakrishnan, yhchiang, rven
      
      Reviewed By: rven
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50205
      fe789c5f
    • I
      Merge pull request #818 from yuslepukhin/improve_test_concurrency · e89e5b25
      Islam AbdelRahman 提交于
      Improve concurrency when running tests
      e89e5b25
    • 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
    • D
      Improve concurrency when running tests · 3277d172
      Dmitri Smirnov 提交于
        PowerShell seems to have a hard time when a flood of async tasks is
        scheduled at the same time.
        I speculated that WaitForMultipleObjects() in Windows can only take up
        to 64 process handles and if you want to handle more than you should write
        some additional code which can be sub-optimal. I.e to implement Wait-Job -Any.
        I decided to test that suggestion and introduced a $Concurrency parameter with a default value of 62.
        So in the new version the script fires up up to $Concurrency value
        and wait for anything to complete before starting any more processes.
        This improved matters greatly. Individual tests against ramdrive now
        run in 8 minutes and all of the 200+ db_tests run in 9 minutes with concurrency
        values of 8-16. About 48 is required to load a CPU on my box running against HD
        but that does not improve running times much.
      
        Other changes include respect -EnableJE for the individual test exes.
        Enforce exclusions for the individual tests.
      3277d172
    • S
      Delete test iterators · c8e01ef9
      Satnam Singh 提交于
      Summary:
      Valgrind reports an issue with the test for GeoIterator.
      This diff explicitly deletes the two iterators used in this test.
      
      Test Plan: This diff is for a test. The test still passes.
      
      Reviewers: IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50193
      c8e01ef9
    • 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
    • I
      Add write_stress to RocksDB Legocastle runs · 14c6e1a0
      Igor Canadi 提交于
      Summary: As title. Let's run it for 1 hour.
      
      Test Plan: How can I test legocastle changes?
      
      Reviewers: IslamAbdelRahman, yhchiang, rven, sdong, anthony, kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D49653
      14c6e1a0
  6. 05 11月, 2015 5 次提交
  7. 04 11月, 2015 5 次提交
    • Y
      Fixed the compile error in RocksDBLite in memory_test.cc · dba5e007
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the following compile error in RocksDBLite:
      
      18:00:33   CC       utilities/memory/memory_test.o
      18:00:33 utilities/memory/memory_test.cc: In function ‘int main(int, char**)’:
      18:00:33 utilities/memory/memory_test.cc:268:66: error: ‘printf’ was not declared in this scope
      18:00:33    printf("Skipped in RocksDBLite as utilities are not supported.");
      18:00:33                                                                   ^
      
      Test Plan: make OPT=-DROCKSDB_LITE memory_test
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D50145
      dba5e007
    • 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
    • S
      Merge branch 'master' of github.com:facebook/rocksdb · 93a96672
      Satnam Singh 提交于
      93a96672
    • S
      Add RocksDb/GeoDb Iterator interface · c9aef3c4
      Satnam Singh 提交于
      Summary:
      This diff is a first step towards an iterator based interface for the
      SearchRadial method which replaces a vector of GeoObjects with an
      iterator for GeoObjects. This diff works by just wrapping the iterator
      for the encapsulated vector of GeoObjects. A future diff could extend
      this approach by defining an interator in terms of the underlying
      iteration in SearchRadial which would then remove the need to have
      an in-memory representation for all the matching GeoObjects.
      Fixes T8421387
      
      Test Plan:
      The existing tests have been modified to work with the new
      interface.
      
      Reviewers: IslamAbdelRahman, kradhakrishnan, dhruba, igor
      
      Reviewed By: igor
      
      Subscribers: igor, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D50031
      c9aef3c4
  8. 03 11月, 2015 3 次提交