1. 27 4月, 2016 3 次提交
    • 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
  2. 26 4月, 2016 5 次提交
  3. 23 4月, 2016 7 次提交
  4. 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
  5. 21 4月, 2016 2 次提交
  6. 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
  7. 19 4月, 2016 8 次提交
    • 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
    • Y
      Fix db_block_cache_test in lite build · 725184b0
      Yi Wu 提交于
      Summary: D56715 move some of the tests from db_test to db_block_cache_test. Some of them should be disabled in lite build.
      
      Test Plan:
          make check -j32
          OPT='-DROCKSDB_LITE' make check -j32
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D56907
      725184b0
    • Y
      Fix lite build · 290883d9
      Yi Wu 提交于
      Summary: Fix rocksdb lite build after D56715.
      
      Test Plan:
        make -j40 'OPT=-g -DROCKSDB_LITE'
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D56895
      290883d9
    • S
      write_callback_test: clean test directory before running tests · 23089fd2
      sdong 提交于
      Summary: write_callback_test fails if previous run didn't finish cleanly. Clean the DB before runing the test.
      
      Test Plan: Run the test that see it doesn't fail any more.
      
      Reviewers: andrewkr, yhchiang, yiwu, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: kradhakrishnan, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56859
      23089fd2
    • Y
      Split db_test.cc · 792762c4
      Yi Wu 提交于
      Summary: Split db_test.cc into several files. Moving several helper functions into DBTestBase.
      
      Test Plan: make check
      
      Reviewers: sdong, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba, andrewkr, kradhakrishnan, yhchiang, leveldb, sdong
      
      Differential Revision: https://reviews.facebook.net/D56715
      792762c4
    • A
      Delete deprecated *BackupableDB interface for backups · 40b840f2
      Andrew Kryczka 提交于
      Summary:
      This interface is redundant and has been deprecated for a while.
      It's also unused internally. Let's delete it.
      
      I moved the comments to the corresponding functions in BackupEngine/
      BackupEngineReadOnly. This caused the diff tool to not work cleanly.
      
      Test Plan:
      unit tests
      
        $ ./backupable_db_test
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D56331
      40b840f2
  8. 18 4月, 2016 1 次提交
    • Y
      Make more tests run in parallel · 6affd45d
      Yi Wu 提交于
      Summary:
      Generate t/run-* scripts to run tests in $PARALLEL_TEST separately, then make check_0 rule execute all of them.
      
      Run `time make check` after running `make all`.
      master: 71 sec
      with this diff: 63 sec.
      
      It seems moving more tests to $PARALLEL_TEST doesn't help improve test time though.
      
      Test Plan:
      Run the following
        make check
        J=16 make check
        J=1 make check
        make valgrind_check
        J=1 make valgrind_check
        J=16 make_valgrind_check
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb, kradhakrishnan, dhruba, andrewkr, yhchiang
      
      Differential Revision: https://reviews.facebook.net/D56805
      6affd45d
  9. 16 4月, 2016 6 次提交