Revision 247d0979aa1f3c317f4f6c73ff3dc88436735063 authored by Mike Kolupaev on 01 December 2016, 15:00:17 UTC, committed by Facebook Github Bot on 01 December 2016, 15:09:15 UTC
Summary:
This adds the ability for compaction filter to say "drop this key-value, and also drop everything up to key x". This will cause the compaction to seek input iterator to x, without reading the data. This can make compaction much faster when large consecutive chunks of data are filtered out. See the changes in include/rocksdb/compaction_filter.h for the new API.

Along the way this diff also adds ability for compaction filter changing merge operands, similar to how it can change values; we're not going to use this feature, it just seemed easier and cleaner to implement it than to document that it's not implemented :)

The diff is not as big as it may seem, about half of the lines are a test.
Closes https://github.com/facebook/rocksdb/pull/1599

Differential Revision: D4252092

Pulled By: al13n321

fbshipit-source-id: 41e1e48
1 parent 96fcefb
Raw File
.travis.yml
sudo: false
language: cpp
os:
  - linux
  - osx
compiler:
  - clang
jdk:
  - oraclejdk7

addons:
   apt:
      sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
      packages: ['clang-3.6' , 'zlib1g-dev', 'libbz2-dev', 'libsnappy-dev', 'curl', 'gflags']
env:
  # Run all tests before db_block_cache_test (db_test, db_test2)
  - JOB_NAME=unittests ROCKSDBTESTS_END=db_block_cache_test
  # Run all tests starting from db_block_cache_test (db_block_cache_test, db_iter_test, ...)
  - JOB_NAME=unittests ROCKSDBTESTS_START=db_block_cache_test
  # Run java tests
  - JOB_NAME=java_test
  # Build ROCKSDB_LITE
  - JOB_NAME=lite_build

install:
  # Build gflags
  # TODO(noetzli): Remove when gflags available through Travis
  - pushd /tmp/ && curl -L https://github.com/gflags/gflags/archive/v2.1.2.tar.gz -o gflags.tar.gz && tar xfz gflags.tar.gz && cd gflags-2.1.2 && cmake . && make && popd

before_script:
  - if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then CXX=clang++-3.6; fi
  # Limit the maximum number of open file descriptors to 8192
  - ulimit -n 8192 || true

script:
  - if [[ "${JOB_NAME}" == 'unittests' ]]; then OPT=-DTRAVIS V=1 make -j4 check_some; fi
  - if [[ "${JOB_NAME}" == 'java_test' ]]; then OPT=-DTRAVIS V=1 make clean jclean rocksdbjava jtest; fi
  - if [[ "${JOB_NAME}" == 'lite_build' ]]; then OPT="-DTRAVIS -DROCKSDB_LITE" V=1 make -j4 static_lib; fi
notifications:
    email:
      - leveldb@fb.com
    webhooks:
      - https://buildtimetrend.herokuapp.com/travis
back to top