1. 27 5月, 2016 2 次提交
    • S
      include/rocksdb/sst_file_writer.h should not depend on util/mutable_cf_options.h · 23d4cf48
      sdong 提交于
      Summary: I don't think util/mutable_cf_options.h is needed inside include/rocksdb/sst_file_writer.h and it is not allowed. Remove it.
      
      Test Plan: Run all tests
      
      Reviewers: IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: lightmark, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D58827
      23d4cf48
    • S
      Fix flaky DBTestDynamicLevel.DynamicLevelMaxBytesBase2 · 345fd73f
      sdong 提交于
      Summary: We added more table properties for each SST file, so when using 2KB SST file size, the estimated size of SST files is off by almost half, causing the LSM tree structure not as expected. Fix it by making file size 4x as previously, as well as LSM base size. Also avoid the sleeping based synchronization and turn to use sync points.
      
      Test Plan: Run paralell unit tests multiple times and make sure they always pass.
      
      Reviewers: IslamAbdelRahman, kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D58749
      345fd73f
  2. 25 5月, 2016 2 次提交
  3. 24 5月, 2016 6 次提交
    • A
      add simulator Cache as class SimCache/SimLRUCache(with test) · 5d660258
      Aaron Gao 提交于
      Summary: add class SimCache(base class with instrumentation api) and SimLRUCache(derived class with detailed implementation) which is used as an instrumented block cache that can predict hit rate for different cache size
      
      Test Plan:
      Add a test case in `db_block_cache_test.cc` called `SimCacheTest` to test basic logic of SimCache.
      Also add option `-simcache_size` in db_bench. if set with a value other than -1, then the benchmark will use this value as the size of the simulator cache and finally output the simulation result.
      ```
      [gzh@dev9927.prn1 ~/local/rocksdb] ./db_bench -benchmarks "fillseq,readrandom" -cache_size 1000000 -simcache_size 1000000
      RocksDB:    version 4.8
      Date:       Tue May 17 16:56:16 2016
      CPU:        32 * Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
      CPUCache:   20480 KB
      Keys:       16 bytes each
      Values:     100 bytes each (50 bytes after compression)
      Entries:    1000000
      Prefix:    0 bytes
      Keys per prefix:    0
      RawSize:    110.6 MB (estimated)
      FileSize:   62.9 MB (estimated)
      Write rate: 0 bytes/second
      Compression: Snappy
      Memtablerep: skip_list
      Perf Level: 0
      WARNING: Assertions are enabled; benchmarks unnecessarily slow
      ------------------------------------------------
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      fillseq      :       6.809 micros/op 146874 ops/sec;   16.2 MB/s
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      readrandom   :       6.343 micros/op 157665 ops/sec;   17.4 MB/s (1000000 of 1000000 found)
      
      SIMULATOR CACHE STATISTICS:
      SimCache LOOKUPs: 986559
      SimCache HITs:    264760
      SimCache HITRATE: 26.84%
      
      [gzh@dev9927.prn1 ~/local/rocksdb] ./db_bench -benchmarks "fillseq,readrandom" -cache_size 1000000 -simcache_size 10000000
      RocksDB:    version 4.8
      Date:       Tue May 17 16:57:10 2016
      CPU:        32 * Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
      CPUCache:   20480 KB
      Keys:       16 bytes each
      Values:     100 bytes each (50 bytes after compression)
      Entries:    1000000
      Prefix:    0 bytes
      Keys per prefix:    0
      RawSize:    110.6 MB (estimated)
      FileSize:   62.9 MB (estimated)
      Write rate: 0 bytes/second
      Compression: Snappy
      Memtablerep: skip_list
      Perf Level: 0
      WARNING: Assertions are enabled; benchmarks unnecessarily slow
      ------------------------------------------------
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      fillseq      :       5.066 micros/op 197394 ops/sec;   21.8 MB/s
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      readrandom   :       6.457 micros/op 154870 ops/sec;   17.1 MB/s (1000000 of 1000000 found)
      
      SIMULATOR CACHE STATISTICS:
      SimCache LOOKUPs: 1059764
      SimCache HITs:    374501
      SimCache HITRATE: 35.34%
      
      [gzh@dev9927.prn1 ~/local/rocksdb] ./db_bench -benchmarks "fillseq,readrandom" -cache_size 1000000 -simcache_size 100000000
      RocksDB:    version 4.8
      Date:       Tue May 17 16:57:32 2016
      CPU:        32 * Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
      CPUCache:   20480 KB
      Keys:       16 bytes each
      Values:     100 bytes each (50 bytes after compression)
      Entries:    1000000
      Prefix:    0 bytes
      Keys per prefix:    0
      RawSize:    110.6 MB (estimated)
      FileSize:   62.9 MB (estimated)
      Write rate: 0 bytes/second
      Compression: Snappy
      Memtablerep: skip_list
      Perf Level: 0
      WARNING: Assertions are enabled; benchmarks unnecessarily slow
      ------------------------------------------------
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      fillseq      :       5.632 micros/op 177572 ops/sec;   19.6 MB/s
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      readrandom   :       6.892 micros/op 145094 ops/sec;   16.1 MB/s (1000000 of 1000000 found)
      
      SIMULATOR CACHE STATISTICS:
      SimCache LOOKUPs: 1150767
      SimCache HITs:    1034535
      SimCache HITRATE: 89.90%
      ```
      
      Reviewers: IslamAbdelRahman, andrewkr, sdong
      
      Reviewed By: sdong
      
      Subscribers: MarkCallaghan, andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57999
      5d660258
    • O
      Update CMakeLists.txt for added test · d379d110
      omegaga 提交于
      Summary: Update CMakeLists.txt for added db_io_failure_test. Depends on D58341
      
      Test Plan: Run make check to see if the tests are working properly.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D58671
      d379d110
    • K
      Direct IO fix for Mac · 21f847ed
      krad 提交于
      Summary:
      O_DIRECT is not available in Mac as a flag for open. The fix is to make
      use of fctl after the file is opened
      
      Test Plan: Run the tests on mac and Linux
      
      Reviewers: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D58665
      21f847ed
    • A
      Clean up the ComputeCompactionScore() API · 99765ed8
      Ashish Shenoy 提交于
      Summary: Make CompactionOptionsFIFO a part of mutable_cf_options
      
      Test Plan: UT
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, lgalanis, dhruba
      
      Differential Revision: https://reviews.facebook.net/D58653
      99765ed8
    • S
      Expose report_bg_io_stats option in the C API. (#1131) · def2f7bd
      Shen Li 提交于
      def2f7bd
    • K
      Direct IO capability for RocksDB · f89caa12
      krad 提交于
      Summary:
      This patch adds direct IO capability to RocksDB Env.
      
      The direct IO capability is required for persistent cache since NVM is best
      accessed as 4K direct IO. SSDs can leverage direct IO for reading.
      
      Direct IO requires the offset and size be sector size aligned, and memory to
      be kernel page aligned. Since neither RocksDB/Persistent read cache data
      layout is aligned to sector size, the code can accommodate reading unaligned IO size
      (or unaligned memory) at the cost of an alloc/copy.
      
      The write code path expects the size and memory to be aligned.
      
      Test Plan: Run RocksDB unit tests
      
      Reviewers: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57393
      f89caa12
  4. 23 5月, 2016 7 次提交
  5. 21 5月, 2016 2 次提交
  6. 20 5月, 2016 7 次提交
    • A
      Eliminate use of 'using namespace std'. Also remove a number of ADL references to std functions. · 2073cf37
      Aaron Orenstein 提交于
      Summary: Reduce use of argument-dependent name lookup in RocksDB.
      
      Test Plan: 'make check' passed.
      
      Reviewers: andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D58203
      2073cf37
    • D
      Split WinEnv into separate classes. (#1128) · 26adaad4
      Dmitri Smirnov 提交于
      For ease of reuse and customization as a library
        without wrapping.
        WinEnvThreads is a class for replacement.
        WintEnvIO is a class for reuse and behavior override.
        Added private virtual functions for custom override
        of fallocate pread for io classes.
      26adaad4
    • K
      Implement GetUniqueId for Mac · bb98ca3c
      krad 提交于
      Summary:
      Persistent read cache relies on the accuracy of the GetUniqueIdFromFile
      to generate a unique key for a given block of data. Currently we don't have an
      implementation for Mac.
      
      This patch adds an implementation.
      
      Test Plan: Run unit tests
      
      Reviewers: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D58413
      bb98ca3c
    • I
      Add MaxOperator to utilities/merge_operators/ · 1f2dca0e
      Islam AbdelRahman 提交于
      Summary:
      Introduce MaxOperator a simple merge operator that return the max of all operands.
      This merge operand help me in benchmarking
      
      Test Plan: Add new unitttests
      
      Reviewers: sdong, andrewkr, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57873
      1f2dca0e
    • R
      Added "number of merge operands" to statistics in ssts. · f6e404c2
      Richard Cairns Jr 提交于
      Summary:
      A couple of notes from the diff:
        - The namespace block I added at the top of table_properties_collector.cc was in reaction to an issue i was having with PutVarint64 and reusing the "val" string.  I'm not sure this is the cleanest way of doing this, but abstracting this out at least results in the correct behavior.
        - I chose "rocksdb.merge.operands" as the property name.  I am open to suggestions for better names.
        - The change to sst_dump_tool.cc seems a bit inelegant to me.  Is there a better way to do the if-else block?
      
      Test Plan:
      I added a test case in table_properties_collector_test.cc.  It adds two merge operands and checks to make sure that both of them are reflected by GetMergeOperands.  It also checks to make sure the wasPropertyPresent bool is properly set in the method.
      
      Running both of these tests should pass:
      ./table_properties_collector_test
      ./sst_dump_test
      
      Reviewers: IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D58119
      f6e404c2
    • E
      Fix formatting of HISTORY.md (#1126) · 7383b64b
      Evan Shaw 提交于
      A couple "New Features" headers needed a blank line before them.
      7383b64b
    • D
      Disable long running GroupCommitTest (#1125) · 0e665c39
      Dmitri Smirnov 提交于
      Add db_test2
      0e665c39
  7. 19 5月, 2016 3 次提交
  8. 18 5月, 2016 5 次提交
    • I
      Fix build · 05c5c39a
      Islam AbdelRahman 提交于
      05c5c39a
    • R
      Long outstanding prepare test · a6254f2b
      Reid Horuff 提交于
      Summary: This tests that a prepared transaction is not lost after several crashes, restarts, and memtable flushes.
      
      Test Plan: TwoPhaseLongPrepareTest
      
      Reviewers: sdong
      
      Subscribers: hermanlee4, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D58185
      a6254f2b
    • I
      Fix TransactionTest.TwoPhaseMultiThreadTest under TSAN · 2ead1151
      Islam AbdelRahman 提交于
      Summary:
      TransactionTest.TwoPhaseMultiThreadTest runs forever under TSAN and our CI builds time out
      looks like the reason is that some threads keep running and other threads dont get a chance to increment the counter
      
      Test Plan: run the test under TSAN
      
      Reviewers: sdong, horuff
      
      Reviewed By: horuff
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D58359
      2ead1151
    • K
      Persistent Read Cache (Part 2) Data structure for building persistent read cache index · 1f0142ce
      krad 提交于
      Summary:
      We expect the persistent read cache to perform at speeds upto 8 GB/s. In order
      to accomplish that, we need build a index mechanism which operate in the order
      of multiple millions per sec rate.
      
      This patch provide the basic data structure to accomplish that:
      
      (1) Hash table implementation with lock contention spread
          It is based on the StripedHashSet<T> implementation in
          The Art of multiprocessor programming by Maurice Henry & Nir Shavit
      (2) LRU implementation
          Place holder algorithm for further optimizing
      (3) Evictable Hash Table implementation
          Building block for building index data structure that evicts data like files
          etc
      
      TODO:
      (1) Figure if the sharded hash table and LRU can be used instead
      (2) Figure if we need to support configurable eviction algorithm for
      EvictableHashTable
      
      Test Plan: Run unit tests
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55785
      1f0142ce
    • A
      [rocksdb] make more options dynamic · 43afd72b
      Aaron Gao 提交于
      Summary:
      make more ColumnFamilyOptions dynamic:
      - compression
      - soft_pending_compaction_bytes_limit
      - hard_pending_compaction_bytes_limit
      - min_partial_merge_operands
      - report_bg_io_stats
      - paranoid_file_checks
      
      Test Plan:
      Add sanity check in `db_test.cc` for all above options except for soft_pending_compaction_bytes_limit and hard_pending_compaction_bytes_limit.
      All passed.
      
      Reviewers: andrewkr, sdong, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57519
      43afd72b
  9. 17 5月, 2016 2 次提交
  10. 16 5月, 2016 1 次提交
    • K
      Added PersistentCache abstraction · a08c8c85
      krad 提交于
      Summary:
      Added a new abstraction to cache page to RocksDB designed for the read
      cache use.
      
      RocksDB current block cache is more of an object cache. For the persistent read cache
      project, what we need is a page cache equivalent. This changes adds a cache
      abstraction to RocksDB to cache pages called PersistentCache. PersistentCache can cache
      uncompressed pages or raw pages (content as in filesystem). The user can
      choose to operate PersistentCache either in  COMPRESSED or UNCOMPRESSED mode.
      
      Blame Rev:
      
      Test Plan: Run unit tests
      
      Reviewers: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55707
      a08c8c85
  11. 14 5月, 2016 1 次提交
    • A
      [ldb] Templatize the Selector · 5c06e081
      Arun Sharma 提交于
      Summary:
      So a customized ldb tool can pass it's own Selector.
      Such a selector is expected to call LDBCommand::SelectCommand
      and then add some of its own customized commands
      
      Test Plan: make ldb
      
      Reviewers: sdong, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57249
      5c06e081
  12. 13 5月, 2016 2 次提交
    • D
      Use generic threadpool for Windows environment (#1120) · aab91b8d
      Dmitri Smirnov 提交于
      Conditionally retrofit thread_posix for use with std::thread
        and reuse the same logic. Posix users continue using Posix interfaces.
        Enable XPRESS compression in test runs.
        Fix master introduced signed/unsigned mismatch.
      aab91b8d
    • R
      TransactionLogIterator sequence gap fix · a4003363
      Reid Horuff 提交于
      Summary: DBTestXactLogIterator.TransactionLogIterator was failing due the sequence gaps. This was caused by an off-by-one error when calculating the new sequence number after recovering from logs.
      
      Test Plan: db_log_iter_test
      
      Reviewers: andrewkr
      
      Subscribers: andrewkr, hermanlee4, dhruba, IslamAbdelRahman
      
      Differential Revision: https://reviews.facebook.net/D58053
      a4003363