1. 29 6月, 2014 1 次提交
  2. 28 6月, 2014 1 次提交
  3. 27 6月, 2014 1 次提交
    • S
      Cache some conditions for DBImpl::MakeRoomForWrite · a3594867
      Stanislau Hlebik 提交于
      Summary:
      Task 4580155. Some conditions in DBImpl::MakeRoomForWrite can be cached in
      ColumnFamilyData, because theirs value can be changed only during compaction,
      adding new memtable and/or add recalculation of compaction score.
      
      These conditions are:
      
      cfd->imm()->size() ==  cfd->options()->max_write_buffer_number - 1
      cfd->current()->NumLevelFiles(0) >=  cfd->options()->level0_stop_writes_trigger
      cfd->options()->soft_rate_limit > 0.0 &&
          (score = cfd->current()->MaxCompactionScore()) >  cfd->options()->soft_rate_limit
      cfd->options()->hard_rate_limit > 1.0 &&
          (score = cfd->current()->MaxCompactionScore()) >  cfd->options()->hard_rate_limit
      
      P.S.
      As it's my first diff, Siying suggested to add everybody as a reviewers
      for this diff. Sorry, if I forgot someone or add someone by mistake.
      
      Test Plan: make all check
      
      Reviewers: haobo, xjin, dhruba, yhchiang, zagfox, ljin, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19311
      a3594867
  4. 26 6月, 2014 3 次提交
    • Y
      Fixed a comparison between signed and unsigned integers in options.cc · 81c5d989
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the following warning:
      
      util/options.cc: In constructor ‘rocksdb::ColumnFamilyOptions::ColumnFamilyOptions(const rocksdb::Options&)’:
      util/options.cc:157:58: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (max_bytes_for_level_multiplier_additional.size() < num_levels) {
                                                                   ^
      
      Test Plan: make all check
      
      Reviewers: haobo, sdong, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19293
      81c5d989
    • S
      Remove MemTableRep::GetIterator(const Slice& slice) · 19de6a7a
      sdong 提交于
      Summary: It seems to me that when ever function MemTableRep::GetIterator(const Slice& slice) is used, we can use MemTableRep::GetDynamicPrefixIterator() instead. Just delete it to simplify the codes.
      
      Test Plan: make all check
      
      Reviewers: yhchiang, ljin
      
      Reviewed By: ljin
      
      Subscribers: xjin, dhruba, haobo, leveldb
      
      Differential Revision: https://reviews.facebook.net/D19281
      19de6a7a
    • Y
      Fixed heap-buffer-overflow issue when Options.num_levels > 7. · 55531fd0
      Yueh-Hsuan Chiang 提交于
      Summary:
      Currently, when num_levels has been changed to > 7, internally
      it will not resize max_bytes_for_level_multiplier_additional.
      As a result, max_bytes_for_level_multiplier_additional.size() will
      be smaller than num_levels, which causes heap-buffer-overflow.
      
      Test Plan: make all check
      
      Reviewers: haobo, sdong, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19275
      55531fd0
  5. 25 6月, 2014 4 次提交
  6. 24 6月, 2014 13 次提交
    • Y
      Merge pull request #181 from nanwu/master · e7c9412a
      Yueh-Hsuan Chiang 提交于
      Corrected the output message in mac-install-gflags.sh
      e7c9412a
    • N
      escaped the special characters and added a dot · fb54eef7
      nawu 提交于
      fb54eef7
    • N
      added a dot · c9ad282e
      nawu 提交于
      c9ad282e
    • Y
      Revert the default setting of InitFromCmdLineArgs(). · 82c31792
      Yueh-Hsuan Chiang 提交于
      Summary:
      Revert the default setting of InitFromCmdLineArgs() as all the callers
      currently provide full set of arguments.
      
      Test Plan:
      make reduce_levels_test
      ./reduce_levels_test
      
      Reviewers: haobo, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19257
      82c31792
    • Y
      Fix compile error in reduce_levels_test. · bf4b1528
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the following compile error.
          tools/reduce_levels_test.cc:89:31: error: no matching function for call to 'InitFromCmdLineArgs'
            LDBCommand* level_reducer = LDBCommand::InitFromCmdLineArgs(args);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          ./util/ldb_cmd.h:56:22: note: candidate function not viable: requires 3 arguments, but 1 was provided
            static LDBCommand* InitFromCmdLineArgs(
                               ^
          ./util/ldb_cmd.h:62:22: note: candidate function not viable: requires 4 arguments, but 1 was provided
            static LDBCommand* InitFromCmdLineArgs(
                               ^
          1 error generated.
      
      Test Plan:
      make reduce_levels_test
      ./reduce_levels_test
      
      Reviewers: haobo, sdong, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19251
      bf4b1528
    • Y
      Fix compile error caused in LDB tool · e5e6f55b
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the following compile error.
          tools/reduce_levels_test.cc:89:31: error: no matching function for call to 'InitFromCmdLineArgs'
            LDBCommand* level_reducer = LDBCommand::InitFromCmdLineArgs(args);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          ./util/ldb_cmd.h:56:22: note: candidate function not viable: requires 3 arguments, but 1 was provided
            static LDBCommand* InitFromCmdLineArgs(
                               ^
          ./util/ldb_cmd.h:62:22: note: candidate function not viable: requires 4 arguments, but 1 was provided
            static LDBCommand* InitFromCmdLineArgs(
                               ^
          1 error generated.
      
      Test Plan:
      make reduce_levels_test
      ./reduce_levels_test
      
      Reviewers: haobo, ljin, sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19251
      e5e6f55b
    • Y
      Fix a rapidjson compile error in mac. · 96663410
      Yueh-Hsuan Chiang 提交于
      Summary:
      This diff fixes the following compilation error in mac.
        ./third-party/rapidjson/reader.h:422:31: error: comparison of constant 256 with expression of type 'Ch' (aka 'char') is always true
              [-Werror,-Wtautological-constant-out-of-range-compare]
                                        if ((sizeof(Ch) == 1 || e < 256) && escape[(unsigned char)e])
                                                                ~ ^ ~~~
        1 error generated.
      
      Test Plan: make db_test
      
      Reviewers: haobo, sdong, igor, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19245
      96663410
    • B
      Update README.md · 854abaf7
      Barnaby 提交于
      typo
      854abaf7
    • H
      [RocksDB] allow LDB tool to have customized key formatter · dfb31d15
      Haobo Xu 提交于
      Summary: Currently ldb tool dump keys either in ascii format or hex format - neither is ideal if the key has a binary structure and is not readable in ascii. This diff also allows LDB tool to be customized in ways beyond DB options.
      
      Test Plan: verify that key formatter works with some simple db with binary key.
      
      Reviewers: sdong, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19209
      dfb31d15
    • L
      db_bench: measure the real latency of write/delete · 3b0dc766
      Lei Jin 提交于
      Summary: as title
      
      Test Plan: make release
      
      Reviewers: haobo, sdong, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19227
      3b0dc766
    • H
      [RocksDB] history change for 3.2 · 3aae4017
      Haobo Xu 提交于
      Summary: as title
      
      Test Plan: none
      
      Reviewers: ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19239
      3aae4017
    • S
      Fix some entries in HISTORY.md · a1ddfc61
      sdong 提交于
      Summary:
      Add one entry to HISTORY.md that is failed to be added.
      Move two other ones to the right location.
      
      Test Plan: Only document
      
      Reviewers: haobo, ljin
      
      Subscribers: dhruba, yhchiang, leveldb
      
      Differential Revision: https://reviews.facebook.net/D19233
      a1ddfc61
    • L
      db_bench: sanity check on compression ratio · a1b5650a
      Lei Jin 提交于
      Summary: as requested by mark
      
      Test Plan: make release
      
      Reviewers: sdong, haobo
      
      Reviewed By: haobo
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19221
      a1b5650a
  7. 23 6月, 2014 4 次提交
  8. 21 6月, 2014 2 次提交
  9. 20 6月, 2014 11 次提交
    • I
      fix valgrind test · 583feae8
      Igor Canadi 提交于
      583feae8
    • I
      Fix release compile · 55805093
      Igor Canadi 提交于
      55805093
    • I
      JSONDocument · 00b26c3a
      Igor Canadi 提交于
      Summary:
      After evaluating options for JSON storage, I decided to implement our own. The reason is that we'll be able to optimize it better and we get to reduce unnecessary dependencies (which is what we'd get with folly).
      
      I also plan to write a serializer/deserializer for JSONDocument with our own binary format similar to BSON. That way we'll store binary JSON format in RocksDB instead of the plain-text JSON. This means less storage and faster deserialization.
      
      There are still some inefficiencies left here. I plan to optimize them after we develop a functioning DocumentDB. That way we can move and iterate faster.
      
      Test Plan: added a unit test
      
      Reviewers: dhruba, haobo, sdong, ljin, yhchiang
      
      Reviewed By: haobo
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18831
      00b26c3a
    • I
      Fix compile · 9fe87b17
      Igor Canadi 提交于
      9fe87b17
    • I
      Remove seek compaction · d4a84233
      Igor Canadi 提交于
      Summary:
      As discussed in our internal group, we don't get much use of seek compaction at the moment, while it's making code more complicated and slower in some cases.
      
      This diff removes seek compaction and (hopefully) all code that was introduced to support seek compaction.
      
      There is one test case that relied on didIO information. I'll try to find another way to implement it.
      
      Test Plan: make check
      
      Reviewers: sdong, haobo, yhchiang, ljin, dhruba
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19161
      d4a84233
    • I
      Use same sorting for all level 0 files · 107e08ba
      Igor Canadi 提交于
      Summary:
      We decided that one of the long term goals is to unify level and universal compaction.
      
      As a small first step, I'm unifying level 0 sorting methods.
      
      Previously, we used to sort level 0 files in level compaction by file number and in universal compaction by sequence number.
      
      But it turns out that in level compaction, sorting by file number is exactly the same as sorting by sequence number.
      
      Test Plan:
      Ran make check with bunch of asserts to verify the sorting order is exactly the same.
      Also, make check with this patch
      
      Reviewers: haobo, yhchiang, ljin, dhruba, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19131
      107e08ba
    • H
      [RocksDB] Make block based table hash index more adaptive · 7a9dd5f2
      Haobo Xu 提交于
      Summary: Currently, RocksDB returns error if a db written with prefix hash index, is later opened without providing a prefix extractor. This is uncessarily harsh. Without a prefix extractor, we could always fallback to the normal binary index.
      
      Test Plan: unit test, also manually veried LOG that fallback did occur.
      
      Reviewers: sdong, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19191
      7a9dd5f2
    • Y
      Fixed a potential write hang · 4f5ccfd1
      Yueh-Hsuan Chiang 提交于
      Summary:
      Currently, when something badly happen in the DB::Write() while the write-queue
      contains more than one element, the current design seems to forget to clean up
      the queue as well as wake-up all the writers, this potentially makes rocksdb
      hang on writes.
      
      Test Plan: make all check
      
      Reviewers: sdong, ljin, igor, haobo
      
      Reviewed By: haobo
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19167
      4f5ccfd1
    • I
      Merge pull request #179 from edsrzf/c-api-compaction-filter · bae49574
      Igor Canadi 提交于
      Support for compaction filters in the C API
      bae49574
    • L
      fix make shared_lib compilation error · 1ec2d1c6
      Lei Jin 提交于
      Summary: s/class ParsedInternalKey/struct ParsedInternalKey
      
      Test Plan: make shared_lib
      
      Reviewers: igor, yhchiang, sdong, haobo
      
      Reviewed By: haobo
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19173
      1ec2d1c6
    • L
      bug fix: iteration over ColumnFamilySet needs to be under mutex · c4e90c79
      Lei Jin 提交于
      Summary: asan_crash_test is failing on segfault
      
      Test Plan: running asan_crash_test
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19149
      c4e90c79