1. 08 7月, 2014 8 次提交
    • I
      Merge pull request #191 from edsrzf/c-api-compaction-filter-factory · 8f6e9ab2
      Igor Canadi 提交于
      C API: Add support for compaction filter factories (v1)
      8f6e9ab2
    • E
      C API: Add test for compaction filter factories · 13a130cc
      Evan Shaw 提交于
      Also refactored the compaction filter tests to share some code and ensure that
      options were getting reset so future test results aren't confused.
      13a130cc
    • E
      C API: Allow setting compaction filter factory · 3f7104d7
      Evan Shaw 提交于
      3f7104d7
    • E
      C API: Add support for compaction filter factories (v1) · 91bede79
      Evan Shaw 提交于
      91bede79
    • E
      Fix compaction_filter.h typos · 0bf5589c
      Evan Shaw 提交于
      0bf5589c
    • R
      Adding NUMA support to db_bench tests · f0660d52
      Radheshyam Balasundaram 提交于
      Summary:
      Changes:
      - Adding numa_aware flag to db_bench.cc
      - Using numa.h library to bind memory and cpu of threads to a fixed NUMA node
      Result: There seems to be no significant change in the micros/op time with numa_aware enabled. I also tried this with other implementations, including a combination of pthread_setaffinity_np, sched_setaffinity and set_mempolicy methods. It'd be great if someone could point out where I'm going wrong and if we can achieve a better micors/op.
      
      Test Plan:
      Ran db_bench tests using following command:
      ./db_bench --db=/mnt/tmp --num_levels=6 --key_size=20 --prefix_size=20 --keys_per_prefix=0 --value_size=100 --block_size=4096 --cache_size=17179869184 --cache_numshardbits=6 --compression_type=none --compression_ratio=1 --min_level_to_compress=-1 --disable_seek_compaction=1 --hard_rate_limit=2 --write_buffer_size=134217728 --max_write_buffer_number=2 --level0_file_num_compaction_trigger=8 --target_file_size_base=134217728 --max_bytes_for_level_base=1073741824 --disable_wal=0 --wal_dir=/mnt/tmp --sync=0 --disable_data_sync=1 --verify_checksum=1 --delete_obsolete_files_period_micros=314572800 --max_grandparent_overlap_factor=10 --max_background_compactions=4 --max_background_flushes=0 --level0_slowdown_writes_trigger=16 --level0_stop_writes_trigger=24 --statistics=0 --stats_per_interval=0 --stats_interval=1048576 --histogram=0 --use_plain_table=1 --open_files=-1 --mmap_read=1 --mmap_write=0 --memtablerep=prefix_hash --bloom_bits=10 --bloom_locality=1 --perf_level=0 --duration=300 --benchmarks=readwhilewriting --use_existing_db=1 --num=157286400 --threads=24 --writes_per_second=10240 --numa_aware=[False/True]
      
      The tests were run in private devserver with 24 cores and the db was prepopulated using filluniquerandom test. The tests resulted in 0.145 us/op with numa_aware=False and 0.161 us/op with numa_aware=True.
      
      Reviewers: sdong, yhchiang, ljin, igor
      
      Reviewed By: ljin, igor
      
      Subscribers: igor, leveldb
      
      Differential Revision: https://reviews.facebook.net/D19353
      f0660d52
    • I
      Merge pull request #190 from edsrzf/c-api-writebatch-serialized · 0bc5fa9f
      Igor Canadi 提交于
      C API: support constructing write batch from serialized representation
      0bc5fa9f
    • I
      Merge pull request #193 from rdallman/columnfamilies · efbb4bd3
      Igor Canadi 提交于
      C API: column family support
      efbb4bd3
  2. 07 7月, 2014 1 次提交
  3. 06 7月, 2014 1 次提交
  4. 04 7月, 2014 8 次提交
  5. 03 7月, 2014 2 次提交
    • S
      Support Multiple DB paths (without having an interface to expose to users) · 2459f7ec
      sdong 提交于
      Summary:
      In this patch, we allow RocksDB to support multiple DB paths internally.
      No user interface is supported yet so this patch is silent to users.
      
      Test Plan: make all check
      
      Reviewers: igor, haobo, ljin, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D18921
      2459f7ec
    • I
      Centralize compression decision to compaction picker · f146cab2
      Igor Canadi 提交于
      Summary:
      Before this diff, we're deciding enable_compression in CompactionPicker and then we're deciding final compression type in DBImpl. This is kind of confusing.
      
      After the diff, the final compression type will be decided in CompactionPicker.
      
      The reason for this is that I want CompactFiles() to specify output compression type, so that people can mix and match compression styles in their compaction algorithms. This diff makes it much easier to do that.
      
      Test Plan: make check
      
      Reviewers: dhruba, haobo, sdong, yhchiang, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19137
      f146cab2
  6. 02 7月, 2014 6 次提交
  7. 01 7月, 2014 3 次提交
    • I
      Fix compile error · f5d4df1c
      Igor Canadi 提交于
      f5d4df1c
    • I
      No need for files_by_size_ in universal compaction · a2e0d890
      Igor Canadi 提交于
      Summary: files_by_size_ is sorted by time in case of universal compaction. However, Version::files_ is also sorted by time. So no need for files_by_size_
      
      Test Plan:
      1) make check with the change
      2) make check with `assert(last_index == c->input_version_->files_[level].size() - 1);` in compaction picker
      
      Reviewers: dhruba, haobo, yhchiang, sdong, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19125
      a2e0d890
    • F
      use arena to allocate memtable's bloomfilter and hashskiplist's buckets_ · 56563674
      Feng Zhu 提交于
      Summary:
          Bloomfilter and hashskiplist's buckets_ allocated by memtable's arena
          DynamicBloom: pass arena via constructor, allocate space in SetTotalBits
          HashSkipListRep: allocate space of buckets_ using arena.
             do not delete it in deconstructor because arena would take care of it.
          Several test files are changed.
      
      Test Plan:
          make all check
      
      Reviewers: ljin, haobo, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: igor, dhruba
      
      Differential Revision: https://reviews.facebook.net/D19335
      56563674
  8. 30 6月, 2014 2 次提交
  9. 29 6月, 2014 2 次提交
  10. 28 6月, 2014 1 次提交
  11. 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
  12. 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
  13. 25 6月, 2014 2 次提交
    • Y
      Reorder the member variables of FileMetaData to improve cache locality. · 8898a0a0
      Yueh-Hsuan Chiang 提交于
      Summary:
      Move stats related member variables of FileMetaData to the bottom to
      improve cache locality of normal DB operations.
      
      Test Plan: make
      
      Reviewers: haobo, ljin, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19287
      8898a0a0
    • Y
      Allow compaction to reclaim storage more effectively. · e813f5b6
      Yueh-Hsuan Chiang 提交于
      Summary:
      This diff allows compaction to reclaim storage more effectively.
      In the current design, compactions are mainly triggered based on
      the file sizes.  However, since deletion entries does not have
      value, files which have many deletion entries are less likely
      to be compacted.  As a result, it may took a while to make
      deletion entries to be compacted.
      
      This diff address issue by compensating the size of deletion
      entries during compaction process: the size of each deletion
      entry in the compaction process is augmented by 2x average
      value size.  The diff applies to both leveled and universal
      compacitons.
      
      Test Plan:
      develop CompactionDeletionTrigger
      make db_test
      ./db_test
      
      Reviewers: haobo, igor, ljin, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19029
      e813f5b6