1. 12 3月, 2015 2 次提交
  2. 11 3月, 2015 2 次提交
    • I
      Get OptimizeFilterForHits work on Mac · 2ddf53b2
      Igor Canadi 提交于
      Summary: Got it working by some voodoo programming
      
      Test Plan: works!
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D34611
      2ddf53b2
    • Y
      Allow GetThreadList() to report the start time of the current operation. · 89597bb6
      Yueh-Hsuan Chiang 提交于
      Summary: Allow GetThreadList() to report the start time of the current operation.
      
      Test Plan:
      ./db_bench --benchmarks=fillrandom --num=100000 --threads=40 \
        --max_background_compactions=10 --max_background_flushes=3 \
        --thread_status_per_interval=1000 --key_size=16 --value_size=1000 \
        --num_column_families=10
      
      Sample output:
                ThreadID ThreadType                    cfName    Operation        OP_StartTime         State
         140338840797248   High Pri column_family_name_000003        Flush 2015/03/09-17:49:59
         140338844991552   High Pri column_family_name_000004        Flush 2015/03/09-17:49:59
         140338849185856    Low Pri
         140338983403584    Low Pri
         140339008569408    Low Pri
         140338861768768    Low Pri
         140338924683328    Low Pri
         140338899517504    Low Pri
         140338853380160    Low Pri
         140338882740288    Low Pri
         140338865963072   High Pri column_family_name_000006        Flush 2015/03/09-17:49:59
         140338954043456    Low Pri
         140338857574464    Low Pri
      
      Reviewers: igor, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: lgalanis, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D34689
      89597bb6
  3. 10 3月, 2015 1 次提交
    • S
      db_bench: Add Option -read_random_exp_range to allow read skewness. · 37921b49
      sdong 提交于
      Summary: Introduce parameter -read_random_exp_range in db_bench to provide some key skewness in readrandom and multireadrandom benchmarks. It will helpful to cover block cache better.
      
      Test Plan:
      Run benchmarks with this new parameter. I can clearly see block cache hit rate change while I increase this value (DB size is about 66MB):
      
      ./db_bench --benchmarks=readrandom -statistics -use_existing_db -cache_size=5000000 --read_random_exp_range=0.0
      rocksdb.block.cache.data.miss COUNT : 958418
      rocksdb.block.cache.data.hit COUNT : 41582
      
      ./db_bench --benchmarks=readrandom -statistics -use_existing_db -cache_size=5000000 --read_random_exp_range=5.0
      rocksdb.block.cache.data.miss COUNT : 819518
      rocksdb.block.cache.data.hit COUNT : 180482
      
      ./db_bench --benchmarks=readrandom -statistics -use_existing_db -cache_size=5000000 --read_random_exp_range=10.0
      rocksdb.block.cache.data.miss COUNT : 450479
      rocksdb.block.cache.data.hit COUNT : 549521
      
      ./db_bench --benchmarks=readrandom -statistics -use_existing_db -cache_size=5000000 --read_random_exp_range=20.0
      rocksdb.block.cache.data.miss COUNT : 223192
      rocksdb.block.cache.data.hit COUNT : 776808
      
      Reviewers: MarkCallaghan, kradhakrishnan, yhchiang, rven, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D34629
      37921b49
  4. 07 3月, 2015 2 次提交
    • I
      Add rate_limiter to string options · 485ac0db
      Igor Canadi 提交于
      Summary: I want to be able to set this through mongo config.
      
      Test Plan: added unit test
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D34599
      485ac0db
    • Y
      Add --thread_status_per_interval to db_bench · dc4532c4
      Yueh-Hsuan Chiang 提交于
      Summary:
      Add --thread_status_per_interval to db_bench, which allows
      db_bench to optionally enable print the current thread status
      periodically.
      
      Test Plan:
      ./db_bench --benchmarks=fillrandom --num=100000 --threads=40 --max_background_compactions=10 --max_background_flushes=3 --thread_status_per_interval=1000 --key_size=16 --value_size=1000 --num_column_families=10
      
      Sample output:
                ThreadID ThreadType                         dbName                     cfName       Operation           State
         140281571770432    Low Pri
         140281575964736   High Pri  /tmp/rocksdbtest-5297/dbbench  column_family_name_000001           Flush
         140281710182464    Low Pri  /tmp/rocksdbtest-5297/dbbench  column_family_name_000008      Compaction
         140281638879296    Low Pri  /tmp/rocksdbtest-5297/dbbench  column_family_name_000007      Compaction
         140281592741952    Low Pri
         140281580159040   High Pri  /tmp/rocksdbtest-5297/dbbench  column_family_name_000002           Flush
         140281676628032    Low Pri  /tmp/rocksdbtest-5297/dbbench  column_family_name_000006      Compaction
         140281584353344    Low Pri
         140281622102080    Low Pri  /tmp/rocksdbtest-5297/dbbench  column_family_name_000009      Compaction
         140281605324864    Low Pri  /tmp/rocksdbtest-5297/dbbench  column_family_name_000004      Compaction
         140281601130560   High Pri  /tmp/rocksdbtest-5297/dbbench                    default           Flush
         140281596936256    Low Pri
         140281588547648    Low Pri
      
      Reviewers: igor, rven, sdong
      
      Reviewed By: rven
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D34515
      dc4532c4
  5. 04 3月, 2015 1 次提交
    • Y
      Fix a bug in stall time counter. Improve its output format. · 694988b6
      Yueh-Hsuan Chiang 提交于
      Summary: Fix a bug in stall time counter.  Improve its output format.
      
      Test Plan:
      export ROCKSDB_TESTS=Timeout
      ./db_test
      
      ./db_bench --benchmarks=fillrandom --stats_interval=10000 --statistics=true --stats_per_interval=1 --num=1000000 --threads=4 --level0_stop_writes_trigger=3 --level0_slowdown_writes_trigger=2
      
      sample output:
          Uptime(secs): 35.8 total, 0.0 interval
          Cumulative writes: 359590 writes, 359589 keys, 183047 batches, 2.0 writes per batch, 0.04 GB user ingest, stall seconds: 1786.008 ms
          Cumulative WAL: 359591 writes, 183046 syncs, 1.96 writes per sync, 0.04 GB written
          Interval writes: 253 writes, 253 keys, 128 batches, 2.0 writes per batch, 0.0 MB user ingest, stall time: 0 us
          Interval WAL: 253 writes, 128 syncs, 1.96 writes per sync, 0.00 MB written
      
      Reviewers: MarkCallaghan, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D34275
      694988b6
  6. 03 3月, 2015 2 次提交
    • I
      options.level_compaction_dynamic_level_bytes to allow RocksDB to pick size... · db037393
      Igor Canadi 提交于
      options.level_compaction_dynamic_level_bytes to allow RocksDB to pick size bases of levels dynamically.
      
      Summary:
      When having fixed max_bytes_for_level_base, the ratio of size of largest level and the second one can range from 0 to the multiplier. This makes LSM tree frequently irregular and unpredictable. It can also cause poor space amplification in some cases.
      
      In this improvement (proposed by Igor Kabiljo), we introduce a parameter option.level_compaction_use_dynamic_max_bytes. When turning it on, RocksDB is free to pick a level base in the range of (options.max_bytes_for_level_base/options.max_bytes_for_level_multiplier, options.max_bytes_for_level_base] so that real level ratios are close to options.max_bytes_for_level_multiplier.
      
      Test Plan: New unit tests and pass tests suites including valgrind.
      
      Reviewers: MarkCallaghan, rven, yhchiang, igor, ikabiljo
      
      Reviewed By: ikabiljo
      
      Subscribers: yoshinorim, ikabiljo, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D31437
      db037393
    • M
      Fix typo in log message · c4bd03a9
      Mark Callaghan 提交于
      Summary:
      fix typo
      
      Task ID: #
      
      Blame Rev:
      
      Test Plan:
      Revert Plan:
      
      Database Impact:
      
      Memcache Impact:
      
      Other Notes:
      
      EImportant:
      
      - begin *PUBLIC* platform impact section -
      Bugzilla: #
      - end platform impact -
      
      Reviewers: igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D34251
      c4bd03a9
  7. 28 2月, 2015 1 次提交
  8. 27 2月, 2015 2 次提交
    • S
      Add columnfamily option optimize_filters_for_hits to optimize for key hits only · e7c434c3
      Sameet Agarwal 提交于
      Summary:
          Summary:
          Added a new option to ColumnFamllyOptions  - optimize_filters_for_hits. This option can be used in the case where most
          accesses to the store are key hits and we dont need to optimize performance for key misses.
          This is useful when you have a very large database and most of your lookups succeed.  The option allows the store to
           not store and use filters in the last level (the largest level which contains data). These filters can take a large amount of
           space for large databases (in memory and on-disk). For the last level, these filters are only useful for key misses and not
           for key hits. If we are not optimizing for key misses, we can choose to not store these filters for that level.
      
          This option is only provided for BlockBasedTable. We skip the filters when we are compacting
      
      Test Plan:
      1. Modified db_test toalso run tests with an additonal option (skip_filters_on_last_level)
       2. Added another unit test to db_test which specifically tests that filters are being skipped
      
      Reviewers: rven, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: lgalanis, yoshinorim, MarkCallaghan, rven, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D33717
      e7c434c3
    • I
      rocksdb: Add missing override · 62247ffa
      Igor Sugak 提交于
      Summary:
      When using latest clang (3.6 or 3.7/trunck) rocksdb is failing with many errors. Almost all of them are missing override errors. This diff adds missing override keyword. No manual changes.
      
      Prerequisites: bear and clang 3.5 build with extra tools
      
      ```lang=bash
      % USE_CLANG=1 bear make all # generate a compilation database http://clang.llvm.org/docs/JSONCompilationDatabase.html
      % clang-modernize -p . -include . -add-override
      % make format
      ```
      
      Test Plan:
      Make sure all tests are passing.
      ```lang=bash
      % #Use default fb code clang.
      % make check
      ```
      Verify less error and no missing override errors.
      ```lang=bash
      % # Have trunk clang present in path.
      % ROCKSDB_NO_FBCODE=1 CC=clang CXX=clang++ make
      ```
      
      Reviewers: igor, kradhakrishnan, rven, meyering, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D34077
      62247ffa
  9. 26 2月, 2015 1 次提交
    • M
      Limit key range to number of keys, not number of writes · 182b4cea
      Mark Callaghan 提交于
      Summary:
      An old commit (482401) changed DoWrite to use the value of --writes rather
      than --num to determine the range for keys. This restores the old and correct
      behavior which is to limit it using --num.
      
      Task ID: #6353043
      
      Blame Rev:
      
      Test Plan:
      run db_bench
      
      Revert Plan:
      
      Database Impact:
      
      Memcache Impact:
      
      Other Notes:
      
      EImportant:
      
      - begin *PUBLIC* platform impact section -
      Bugzilla: #
      - end platform impact -
      
      Reviewers: igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D34065
      182b4cea
  10. 25 2月, 2015 4 次提交
  11. 24 2月, 2015 2 次提交
  12. 21 2月, 2015 4 次提交
    • J
      inputs: restore "const" attribute removed by D33759 · a2b911b6
      Jim Meyering 提交于
      Summary:
      The "const" attribute applies to the type, and placing it
      before that return type retains the desired semantics,
      yet avoids the compiler error/warning.
      
      Test Plan: Run make
      
      Reviewers: ljin, sdong, igor.sugak, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D33789
      a2b911b6
    • J
      fix erroneous assert: cast kBlockSize (of type unsigned int) to "int" · c6d54b50
      Jim Meyering 提交于
      Summary:
      Otherwise, we would assert that an unsigned expression is always >= 0.
      The intent was to form a possibly negative number, and to assert that
      that value is always >= 0, but since one variable in the computation
      was unsigned, the result was guaranteed to be unsigned, too, rendering
      the assertion useless.
      
      Cast that unsigned variable to "int", so that all operands
      are signed, and thus so that the result can be negative.
      
      Test Plan:
        Run "make EXTRA_CXXFLAGS='-W -Wextra'" and see fewer errors.
      
      Reviewers: ljin, sdong, igor.sugak, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D33771
      c6d54b50
    • J
      maint: remove extraneous "const" attribute from return type · c37937a9
      Jim Meyering 提交于
      Summary:
      The "const" attribute does not make sense on a return type,
      and provokes a warning/error from gcc -W -Wextra.
      
      Test Plan:
        Run "make EXTRA_CXXFLAGS='-W -Wextra'" and see fewer errors.
      
      Reviewers: ljin, sdong, igor.sugak, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D33759
      c37937a9
    • J
      build: remove always-true assertions · 9283c7af
      Jim Meyering 提交于
      Summary:
      Remove some always-true assertions.
      They provoke these compilation failures:
      
        table/plain_table_key_coding.cc:279:20: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
        db/version_set.cc:336:15: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
      
      * table/plain_table_key_coding.cc (rocksdb): Remove assertion that
      unsigned type variable is >= 0.
      * db/version_set.cc (DoGenerateLevelFilesBrief): Likewise.
      
      Test Plan:
        Run "make EXTRA_CXXFLAGS='-W -Wextra'" and see fewer errors.
      
      Reviewers: ljin, sdong, igor.sugak, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D33747
      9283c7af
  13. 20 2月, 2015 3 次提交
    • I
      rocksdb: Fix scan-build bug 'Memory leak' in db/db_bench.cc · 73711f95
      Igor Sugak 提交于
      Summary:
      The bug is detected by scan-build.
      
      In `void WriteSeqSeekSeq(ThreadState* thread)` memory is allocated in line 3118 `Slice key = AllocateKey();` but `Slice` is not responsible deleting `Slice::data()`.
      
      Added `std::unique_ptr<const char[]>*` parameter to ` AllocateKey()`, so that it requires caller to not forget about Slice::data() management.
      
      scan-build bug report: http://home.fburl.com/~sugak/latest6/report-6e9754.html#EndPath
      
      Test Plan:
      Make sure scan-build does not report 'Memory leak' in db/db_bench.cc and all tests are passing.
      ```lang=bash
      % make analyze
      % make check
      ```
      
      Reviewers: lgalanis, igor, meyering, sdong
      
      Reviewed By: meyering, sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D33501
      73711f95
    • J
      build: do not relink every single binary just for a timestamp · a42324e3
      Jim Meyering 提交于
      Summary:
      Prior to this change, "make check" would always waste a lot of
      time relinking 60+ binaries. With this change, it does that
      only when the generated file, util/build_version.cc, changes,
      and that happens only when the date changes or when the
      current git SHA changes.
      
      This change makes some other improvements: before, there was no
      rule to build a deleted util/build_version.cc. If it was somehow
      removed, any attempt to link a program would fail.
      There is no longer any need for the separate file,
      build_tools/build_detect_version.  Its functionality is
      now in the Makefile.
      
      * Makefile (DEPFILES): Don't filter-out util/build_version.cc.
      No need, and besides, removing that dependency was wrong.
      (date, git_sha, gen_build_version): New helper variables.
      (util/build_version.cc): New rule, to create this file
      and update it only if it would contain new information.
      * build_tools/build_detect_platform: Remove file.
      * db/db_impl.cc: Now, print only date (not the time).
      * util/build_version.h (rocksdb_build_compile_time): Remove
      declaration.  No longer used.
      
      Test Plan:
      - Run "make check" twice, and note that the second time no linking is performed.
      - Remove util/build_version.cc and ensure that any "make"
      command regenerates it before doing anything else.
      - Run this: strings librocksdb.a|grep _build_.
      That prints output including the following:
      
        rocksdb_build_git_date:2015-02-19
        rocksdb_build_git_sha:2.8.fb-1792-g3cb6cc0
      
      Reviewers: ljin, sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D33591
      a42324e3
    • S
      Add rocksdb.num-live-versions: number of live versions · d45a6a40
      sdong 提交于
      Summary: Add a DB property about live versions. It can be helpful to figure out whether there are files not live but not yet deleted, in some use cases.
      
      Test Plan: make all check
      
      Reviewers: rven, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: yoshinorim, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D33327
      d45a6a40
  14. 19 2月, 2015 1 次提交
    • V
      Managed iterator · 7d817268
      Venkatesh Radhakrishnan 提交于
      Summary:
      This is a diff for managed iterator. A managed iterator
      is a wrapper around an iterator which saves the options for that
      iterator as well as the current key/value so that the underlying iterator
      and its associated memory can be released when it is aged out
      automatically or on the request of the user. Will provide the automatic release as a follow-up diff.
      
      Test Plan: Managed* tests in db_test and XF tests for managed iterator
      
      Reviewers: igor, yhchiang, anthony, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D31401
      7d817268
  15. 18 2月, 2015 2 次提交
  16. 13 2月, 2015 1 次提交
    • I
      Introduce job_id for flush and compaction · e7ea51a8
      Igor Canadi 提交于
      Summary:
      It would be good to assing background job their IDs. Two benefits:
      1) makes LOGs more readable
      2) I might use it in my EventLogger, which will try to make our LOG easier to read/query/visualize
      
      Test Plan: ran rocksdb, read the LOG
      
      Reviewers: sdong, rven, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D31617
      e7ea51a8
  17. 12 2月, 2015 2 次提交
  18. 10 2月, 2015 6 次提交
  19. 09 2月, 2015 1 次提交