1. 29 4月, 2016 3 次提交
  2. 28 4月, 2016 8 次提交
    • L
      Merge pull request #1101 from flyd1005/wip-fix-typo · 6d4832a9
      Li Peng 提交于
      fix typos and remove duplicated words
      6d4832a9
    • I
      Fix typo in build_tools/fbcode_config.sh · af70f9ac
      Islam AbdelRahman 提交于
      Summary: Fix typo in build_tools/fbcode_config.sh
      
      Test Plan: none
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57363
      af70f9ac
    • A
      Fix compression dictionary clang errors · 54de13ab
      Andrew Kryczka 提交于
      Summary: There were a few narrowing conversions that clang didn't like.
      
      Test Plan:
        $ make clean && USE_CLANG=1 DISABLE_JEMALLOC=1 TEST_TMPDIR=/dev/shm/rocksdb OPT=-g make -j32 check
      
      Reviewers: IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57351
      54de13ab
    • I
      Fix build on machines without jemalloc · 0850bc51
      Islam AbdelRahman 提交于
      Summary: It looks like we mistakenly enable JEMALLOC even if it's not available on the machine, that's why travis is failing
      
      Test Plan:
      check on my devserver
      check on my mac
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57345
      0850bc51
    • A
      Configurable compression in db_bench · 4032145a
      Andrew Kryczka 提交于
      Summary:
      Made compression type and dictionary size configurable via environment
      variables.
      
      Depends on D52287.
      
      Test Plan:
      check these options are passed to the db.
      
        $ COMPRESSION_MAX_DICT_BYTES=65536 COMPRESSION_TYPE=LZ4 NUM_KEYS=10000000 DB_DIR=./tmp/ WAL_DIR=./tmp/ ./tools/benchmark.sh filluniquerandom
        ...
        $ grep Options.compression tmp/LOG
        2016/04/22-19:11:30.397829 7f5f263a2980          Options.compression: LZ4
        ...
        2016/04/22-19:11:30.397837 7f5f263a2980         Options.compression_opts.max_dict_bytes: 65536
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57141
      4032145a
    • A
      Shared dictionary compression using reference block · 843d2e31
      Andrew Kryczka 提交于
      Summary:
      This adds a new metablock containing a shared dictionary that is used
      to compress all data blocks in the SST file. The size of the shared dictionary
      is configurable in CompressionOptions and defaults to 0. It's currently only
      used for zlib/lz4/lz4hc, but the block will be stored in the SST regardless of
      the compression type if the user chooses a nonzero dictionary size.
      
      During compaction, computes the dictionary by randomly sampling the first
      output file in each subcompaction. It pre-computes the intervals to sample
      by assuming the output file will have the maximum allowable length. In case
      the file is smaller, some of the pre-computed sampling intervals can be beyond
      end-of-file, in which case we skip over those samples and the dictionary will
      be a bit smaller. After the dictionary is generated using the first file in a
      subcompaction, it is loaded into the compression library before writing each
      block in each subsequent file of that subcompaction.
      
      On the read path, gets the dictionary from the metablock, if it exists. Then,
      loads that dictionary into the compression library before reading each block.
      
      Test Plan: new unit test
      
      Reviewers: yhchiang, IslamAbdelRahman, cyan, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, yoshinorim, kradhakrishnan, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52287
      843d2e31
    • Y
      Temporarily disable CompactFiles in db_stress in its default setting · ad573b90
      Yueh-Hsuan Chiang 提交于
      Summary:
      As db_stress with CompactFiles possibly catches a previous bug currently,
      temporarily disable CompactFiles in db_stress in its default setting
      to allows new bug to be detected while investigating the bug in CompactFiles.
      
      Test Plan: crash test
      
      Reviewers: sdong, kradhakrishnan, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57333
      ad573b90
    • S
      Print memory allocation counters · 1c80dfab
      Sergey Makarenko 提交于
      Summary:
      Introduced option to dump malloc statistics using new option flag.
          Added new command line option to db_bench tool to enable this
          funtionality.
          Also extended build to support environments with/without jemalloc.
      
      Test Plan:
      1) Build rocksdb using `make` command. Launch the following command
          `./db_bench --benchmarks=fillrandom --dump_malloc_stats=true
          --num=10000000` end verified that jemalloc dump is present in LOG file.
          2) Build rocksdb using `DISABLE_JEMALLOC=1  make db_bench -j32` and ran
          the same db_bench tool and found the following message in LOG file:
          "Please compile with jemalloc to enable malloc dump".
          3) Also built rocksdb using `make` command on MacOS to verify behavior
          in non-FB environment.
          Also to debug build configuration change temporary changed
          AM_DEFAULT_VERBOSITY = 1 in Makefile to see compiler and build
          tools output. For case 1) -DROCKSDB_JEMALLOC was present in compiler
          command line. For both 2) and 3) this flag was not present.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57321
      1c80dfab
  3. 27 4月, 2016 4 次提交
    • I
      Fix BackupableDBTest · eb739808
      Islam AbdelRahman 提交于
      Summary: Fix BackupableDBTest.NoDoubleCopy and BackupableDBTest.DifferentEnvs by mocking the db files in db_env instead of backup_env_
      
      Test Plan: make check -j64
      
      Reviewers: sdong, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57273
      eb739808
    • S
      CompactedDB should not be used if there is outstanding WAL files · ac0e54b4
      sdong 提交于
      Summary: CompactedDB skips memtable. So we shouldn't use compacted DB if there is outstanding WAL files.
      
      Test Plan: Change to options.max_open_files = -1 perf context test to create a compacted DB, which we shouldn't do.
      
      Reviewers: yhchiang, kradhakrishnan, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57057
      ac0e54b4
    • I
      Introduce PinnedIteratorsManager (Reduce PinData() overhead / Refactor PinData) · d719b095
      Islam AbdelRahman 提交于
      Summary:
      While trying to reuse PinData() / ReleasePinnedData() .. to optimize away some memcpys I realized that there is a significant overhead for using PinData() / ReleasePinnedData if they were called many times.
      This diff refactor the pinning logic by introducing PinnedIteratorsManager a centralized component that will be created once and will be notified whenever we need to Pin an Iterator. This implementation have much less overhead than the original implementation
      
      Test Plan:
      make check -j64
      COMPILE_WITH_ASAN=1 make check -j64
      
      Reviewers: yhchiang, sdong, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56493
      d719b095
    • A
      Retrieve file size from proper Env · 1995e34d
      Andrew Kryczka 提交于
      Summary:
      When db_env_ != backup_env_, InsertPathnameToSizeBytes() would
      use the wrong Env during backup creation. This happened because this function
      used backup_env_ instead of db_env_ to get WAL/data file sizes.
      
      This diff adds an argument to InsertPathnameToSizeBytes() indicating which Env
      to use.
      
      Test Plan: ran @anirbanb's BackupTestTool
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57159
      1995e34d
  4. 26 4月, 2016 5 次提交
  5. 23 4月, 2016 7 次提交
  6. 22 4月, 2016 2 次提交
    • Y
      Fix RocksDB Lite build in db_stress · 644f978c
      Yueh-Hsuan Chiang 提交于
      Summary: Fix RocksDB Lite build in db_stress
      
      Test Plan: OPT=-DROCKSDB_LITE db_stress
      
      Reviewers: IslamAbdelRahman, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57045
      644f978c
    • I
      Add comparator, merge operator, property collectors to SST file properties (again) · 5bd4022f
      Islam AbdelRahman 提交于
      Summary:
      This is the original diff that I have landed and reverted and now I want to land again https://reviews.facebook.net/D34269
      
      For old SST files we will show
      ```
        comparator name: N/A
        merge operator name: N/A
        property collectors names: N/A
      ```
      
      For new SST files with no merge operator name and with no property collectors
      ```
        comparator name: leveldb.BytewiseComparator
        merge operator name: nullptr
        property collectors names: []
      ```
      
      for new SST files with these properties
      ```
        comparator name: leveldb.BytewiseComparator
        merge operator name: UInt64AddOperator
        property collectors names: [DummyPropertiesCollector1,DummyPropertiesCollector2]
      ```
      
      Test Plan: unittests
      
      Reviewers: andrewkr, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56487
      5bd4022f
  7. 21 4月, 2016 2 次提交
  8. 20 4月, 2016 6 次提交
    • D
      Introduce XPRESS compresssion on Windows. (#1081) · ee221d2d
      Dmitri Smirnov 提交于
      Comparable with Snappy on comp ratio.
        Implemented using Windows API, does not require external package.
        Avaiable since Windows 8 and server 2012.
        Use -DXPRESS=1 with CMake to enable.
      ee221d2d
    • F
      Merge pull request #1083 from flabby/master · 874c96ac
      flabby 提交于
      fix typo  in comment of options.h
      874c96ac
    • Y
      Enable testing CompactFiles in db_stress · 6cbffd50
      Yueh-Hsuan Chiang 提交于
      Summary:
      Enable testing CompactFiles in db_stress by adding flag test_compact_files
      to db_stress.
      
      Test Plan:
      ./db_stress --test_compact_files=1 --compaction_style=0 --allow_concurrent_memtable_write=false --ops_per_thread=100000
      ./db_stress --test_compact_files=1 --compaction_style=1 --allow_concurrent_memtable_write=false --ops_per_thread=100000
      
      Sample output (note that it's normal to have some CompactFiles() failed):
          Stress Test : 491.891 micros/op 65054 ops/sec
                      : Wrote 21.98 MB (0.45 MB/sec) (45% of 3200352 ops)
                      : Wrote 1440728 times
                      : Deleted 441616 times
                      : Single deleted 38181 times
                      : 319251 read and 19025 found the key
                      : Prefix scanned 640520 times
                      : Iterator size sum is 9691415
                      : Iterated 319704 times
                      : Got errors 0 times
                      : 1323 CompactFiles() succeed
                      : 32 CompactFiles() failed
          2016/04/11-15:50:58  Verification successful
      
      Reviewers: sdong, IslamAbdelRahman, kradhakrishnan, yiwu, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D56565
      6cbffd50
    • I
      Fix DBTest.RateLimitedDelete flakiness · b95510dd
      Islam AbdelRahman 提交于
      Summary: We need to enable sync_point processing before creating the SstFileManager to ensure that we are holding the bg delete scheduler thread from running
      
      Test Plan:
      run the test
      debug using printf
      
      Reviewers: sdong, yhchiang, yiwu, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56871
      b95510dd
    • I
      Fix nullptr dereference in adaptive_table · 6356b4d5
      Islam AbdelRahman 提交于
      Summary:
      @dulmarod Ran infer on RocksDB and found that we dereference nullptr in adaptive_table
      https://fb.facebook.com/groups/rocksdb/permalink/1046374415411173/
      
      Test Plan: make check -j64
      
      Reviewers: sdong, yhchiang, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56973
      6356b4d5
    • A
      Delete deprecated backup classes in Java · 9385fd72
      Andrew Kryczka 提交于
      Summary: Corresponding change to D56331.
      
      Test Plan:
      Now build succeeds:
      
        $ make jclean && make rocksdbjava
      
      Reviewers: yhchiang, IslamAbdelRahman, adamretter
      
      Reviewed By: adamretter
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D56913
      9385fd72
  9. 19 4月, 2016 3 次提交
    • Y
      [db_stress] Make subcompaction random in crash_test · a2466c88
      Yueh-Hsuan Chiang 提交于
      Summary: Make subcompaction random in crash_test
      
      Test Plan: make crash_test and verify whether subcompaction changes randomly
      
      Reviewers: IslamAbdelRahman, kradhakrishnan, yiwu, sdong, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D56571
      a2466c88
    • A
      Fix column label for L0 write sum · c3c389d5
      Andrew Kryczka 提交于
      Summary:
      This is taken from the "Write(GB)" column in compaction stats, so the
      units should be GB, not MB.
      
      Test Plan: none
      
      Reviewers: sdong, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56889
      c3c389d5
    • A
      New legocastle output parsing · ec84bef2
      Andrew Kryczka 提交于
      Summary:
      Added a python script to parse combined stdout/stderr of legocastle
      steps. Previously we just matched words like 'Failure', which didn't work since
      even our test names matched that pattern.
      
      I went through all the legocastle steps to come up with strict failure regexes
      for the common failure cases. There is also some more complex logic to present
      gtest failures, since the test name and failure message are not on the same
      line.
      
      There will definitely be error cases that don't match any of these patterns, so
      we can iterate on it over time.
      
      Test Plan:
      no end-to-end test. I ran the legocastle steps locally and piped to
      my script, then verified output, e.g.,
      
        $ set -o pipefail && TEST_TMPDIR=/dev/shm/rocksdb COMPILE_WITH_ASAN=1 OPT=-g make J=1 asan_check |& /usr/facebook/ops/scripts/asan_symbolize.py -d |& python build_tools/error_filter.py asan
        ==2058029==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000a414 at pc 0x4c12f6 bp 0x7ffcfb7a0520 sp 0x7ffcfb7a0518
      
      Reviewers: kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D56691
      ec84bef2