1. 09 10月, 2015 1 次提交
    • I
      compaction_filter.h cleanup · 9803e0d8
      Igor Canadi 提交于
      Summary:
      Two changes:
      1. remove *V2 filter stuff. we deprecated that a while ago
      2. clarify what happens when user sets max_subcompactions to bigger than 1
      
      Test Plan: none
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47871
      9803e0d8
  2. 08 10月, 2015 8 次提交
    • I
      Bytes read/written from cache statistics · 51fa7ece
      Islam AbdelRahman 提交于
      Summary: Add 2 new counters BLOCK_CACHE_BYTES_WRITE, BLOCK_CACHE_BYTES_READ to keep track of how many bytes were written to the cache and how many bytes that we read from cache
      
      Test Plan: make check
      
      Reviewers: sdong, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D48195
      51fa7ece
    • I
      Create Makefile target unity_test · f925208f
      Igor Canadi 提交于
      Summary: unity_test will compile db_test with unity.a instead of librocksdb.a. This will test both the compilation and some small amount of runtime.
      
      Test Plan: This is a test :)
      
      Reviewers: kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48297
      f925208f
    • D
      bloom hit/miss stats for SST and memtable · a065cdb3
      dyniusz 提交于
      Summary:
      	hit and miss bloom filter stats for memtable and SST
      	stats added to perf_context struct
      	key matches and prefix matches combined into one stat
      
      Test Plan: unit test veryfing the functionality added, see BloomStatsTest in db_test.cc for details
      
      Reviewers: yhchiang, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47859
      a065cdb3
    • I
      Fix compile error on platforms without fallocate() · 40cdf797
      Igor Canadi 提交于
      Summary:
      If a platform doesn't have ROCKSDB_FALLOCATE_PRESENT, then compiler complains:
      
      util/env_posix.cc:354:8: error: private field 'allow_fallocate_' is not used [-Werror,-Wunused-private-field]
      
      This was caught by travis.
      
      Test Plan: compiles with ROCKSDB_FALLOCATE_PRESENT.
      
      Reviewers: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48327
      40cdf797
    • I
      Fix compile failure on Travis · 77e4ad7c
      Igor Canadi 提交于
      Summary:
      Travis is complaining against using {} to initialize KVMap: https://travis-ci.org/facebook/rocksdb/jobs/84132600
      
            db/compaction_job_test.cc:526:26: error: chosen constructor is explicit in copy-initialization
              RunCompaction({files}, {});
      
      This diff should fix it
      
      Test Plan: travis
      
      Reviewers: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48309
      77e4ad7c
    • L
      Added boolean variable to guard fallocate() calls · 4049bcde
      Lakshmi Narayanan 提交于
      Summary:
      Added boolean variable to guard fallocate() calls.
      Set to false to prevent space leaks when tests fail.
      
      Test Plan:
      Compliles
      Set to false and ran log device tests
      
      Reviewers: sdong, lovro, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D48027
      4049bcde
    • I
      Travis shouldn't fail when clang-format suggests improvements · aadf49fe
      Igor Canadi 提交于
      Summary: This diff avoids failing travis test when clang-format fails. We should keep the test green even if clang-format fails. It would be good to look at travis output for pull requests to make sure they're following the good code style. However, we broke travis test 3 times today because of formatting issues. We should keep travis test green if the only thing wrong is the formatting.
      
      Test Plan: none
      
      Reviewers: sdong, yhchiang, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48291
      aadf49fe
    • I
      Compaction filter on merge operands · d80ce7f9
      Igor Canadi 提交于
      Summary:
      Since Andres' internship is over, I took over https://reviews.facebook.net/D42555 and rebased and simplified it a bit.
      
      The behavior in this diff is a bit simpler than in D42555:
      * only merge operators are passed through FilterMergeValue(). If fitler function returns true, the merge operator is ignored
      * compaction filter is *not* called on: 1) results of merge operations and 2) base values that are getting merged with merge operands (the second case was also true in previous diff)
      
      Do we also need a compaction filter to get called on merge results?
      
      Test Plan: make && make check
      
      Reviewers: lovro, tnovak, rven, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: noetzli, kolmike, leveldb, dhruba, sdong
      
      Differential Revision: https://reviews.facebook.net/D47847
      d80ce7f9
  3. 07 10月, 2015 7 次提交
  4. 06 10月, 2015 4 次提交
    • I
      Update dump_tool and undump_tool to accept Options · 9babaeed
      Islam AbdelRahman 提交于
      Summary:
      Refactor dump_tool and undump_tool so that it's possible to use them with customized options
      for example setting a specific comparator similar to what Dragon is doing with the LdbTool
      
      https://phabricator.fb.com/diffusion/FBCODE/browse/master/dragon/tools/Ldb.cpp
      
      Test Plan:
      compiles
      used it to dump / undump a dragon shard
      
      Reviewers: sdong, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, adsharma
      
      Differential Revision: https://reviews.facebook.net/D47853
      9babaeed
    • I
      Fix condition for bottommost level · eb5b637f
      Igor Canadi 提交于
      Summary:
      The function GetBoundaryKeys() returns the smallest key from the first file and largest key from the last file. This is good for any level >0, but it's not correct for level 0. In level 0, files can overlap, so we need to check all files for boundary keys. This bug can cause wrong value for bottommost_level in compaction (value of true, although correct is false), which means we can set sequence numbers to 0 even if the key is not the oldest one in the database.
      
      Herman reported corruption while testing MyRocks. Fortunately, the patch that added the bug was not released yet.
      
      Test Plan: added a new test to compaction_picker_test.
      
      Reviewers: hermanlee4, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48201
      eb5b637f
    • I
      Make corruption_test more robust · 9eaff629
      Igor Canadi 提交于
      Summary:
      Latest travis failed because of corruption test TableFileIndexData: https://travis-ci.org/facebook/rocksdb/jobs/83732558
      
      This diff makes the test more explicit:
      1. create two files
      2. corrupt the second's file index
      3. expect to get only 5000 keys when range scanning
      
      Test Plan: the test is still passing :)
      
      Reviewers: sdong, rven, yhchiang, kradhakrishnan, IslamAbdelRahman, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48183
      9eaff629
    • I
      Fix valgrind - Initialize done variable · bf19dbff
      Igor Canadi 提交于
      Summary: Fixes the valgrind warning "Conditional jump or move depends on uninitialised value(s)"
      
      Test Plan: valgrind test, no more warning
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48177
      bf19dbff
  5. 03 10月, 2015 5 次提交
    • Y
      [RocksDB Options] Support more options in RocksDBOptionParser for sanity check. · 5c7bf56d
      Yueh-Hsuan Chiang 提交于
      Summary:
      RocksDBOptionsParser now supports CompressionType and the following
      pointer-typed options in RocksDBOptionParser
      for sanity check:
        prefix_extractor
        table_factory
        comparator
        compaction_filter
        compaction_filter_factory
        merge_operator
        memtable_factory
      
      In the RocksDB Options file, only high level information about pointer-typed
      options are serialized, and those information is only used for verification
      / sanity check purpose.
      
      Test Plan: added more tests in options_test
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47925
      5c7bf56d
    • I
      Add APIs PauseBackgroundWork() and ContinueBackgroundWork() · 115427ef
      Igor Canadi 提交于
      Summary:
      To support a new MongoDB capability, we need to make sure that we don't do any IO for a short period of time. For background, see:
      * https://jira.mongodb.org/browse/SERVER-20704
      * https://jira.mongodb.org/browse/SERVER-18899
      
      To implement that, I add a new API calls PauseBackgroundWork() and ContinueBackgroundWork() which reuse the capability we already have in place for RefitLevel() function.
      
      Test Plan: Added a new test in db_test. Made sure that test fails when PauseBackgroundWork() is commented out.
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47901
      115427ef
    • K
      Adding features to CI job description · a3989736
      krad 提交于
      Summary: Added following capability
      (1) Ability to do configurable reports using args
      (2) Support to generating a task on failure
      (3) Ability to configure email trigger condition
      
      Test Plan: Manual testing
      
      Reviewers:
      
      CC:leveldb@
      
      Task ID: #6968635
      
      Blame Rev:
      a3989736
    • I
      Merge pull request #748 from yuslepukhin/improve_test_runs · a47bf325
      Igor Canadi 提交于
      Improve test running scripts
      a47bf325
    • D
      Improve test running scripts · 65324a16
      Dmitri Smirnov 提交于
        Introduce proper command line arguments so we can control the script
        Add appveyor support
        Add an ability to run all other (non db_tests) test executables in parallel
        Use .NET HashSet instead of empty valued hashtable to improve the looks
        TODO: Some of the tests do not use GTests and need to improve log parsing
      65324a16
  6. 01 10月, 2015 6 次提交
    • I
      Merge pull request #743 from edsrzf/amalgamation · 7e4ee423
      Igor Canadi 提交于
      New amalgamation target
      7e4ee423
    • E
      New amalgamation target · 7a23e4d8
      Evan Shaw 提交于
      This commit adds two new targets to the Makefile: rocksdb.cc and rocksdb.h
      
      These files, when combined with the c.h header, are a self-contained RocksDB
      source distribution called an amalgamation. (The name comes from SQLite's, which
      is similar in concept.)
      
      The main benefit of an amalgamation is that it's very easy to drop into a
      new project. It also compiles faster compared to compiling individual source
      files and potentially gives the compiler more opportunity to make optimizations
      since it can see all functions at once.
      
      rocksdb.cc and rocksdb.h are generated by a new script, amalgamate.py.
      A detailed description of how amalgamate.py works is in a comment at the top of
      the file.
      
      There are also some small changes to existing files to enable the amalgamation:
      * Use quotes for includes in unity build
      * Fix an old header inclusion in util/xfunc.cc
      * Move some includes outside ifdef in util/env_hdfs.cc
      * Separate out tool sources in Makefile so they won't be included in unity.cc
      * Unity build now produces a static library
      
      Closes #733
      7a23e4d8
    • I
      Merge pull request #745 from yuslepukhin/test_appveyor_baseline · e9a6808c
      Igor Canadi 提交于
      Improve CI build and fix Windows build breakage
      e9a6808c
    • D
      Improve CI build and fix Windows build breakage · 9320ffd6
      Dmitri Smirnov 提交于
        Is there a way to enforce CMake additions for internal changes that seem to come
        w/o a PR?
      9320ffd6
    • A
      Return MergeInProgress when fetching from transactions or WBWI with overwrite_key · 03b08ba9
      agiardullo 提交于
      Summary:
      WriteBatchWithIndex::GetFromBatchAndDB only works correctly for overwrite_key=false.  Transactions use overwrite_key=true (since WriteBatchWithIndex::GetIteratorWithBase only works when overwrite_key=true).  So currently, Transactions could return incorrectly merged results when calling Get/GetForUpdate().
      
      Until a permanent fix can be put in place, Transaction::Get[ForUpdate] and WriteBatchWithIndex::GetFromBatch[AndDB] will now return MergeInProgress if the most recent write to a key in the batch is a Merge.
      
      Test Plan: more tests
      
      Reviewers: sdong, yhchiang, rven, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47817
      03b08ba9
    • I
      Add max_file_opening_threads to db_bench · c29af48d
      Islam AbdelRahman 提交于
      Summary: Add an option to db_bench for max_file_opening_threads
      
      Test Plan: compile and run db_bench
      
      Reviewers: sdong, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, paultuckfield
      
      Differential Revision: https://reviews.facebook.net/D47811
      c29af48d
  7. 30 9月, 2015 8 次提交
    • Y
      Add a missing check for deprecated options in options_helper.cc · da1cf8a9
      Yueh-Hsuan Chiang 提交于
      Summary: Add a missing check for deprecated options in options_helper.cc
      
      Test Plan: options_test
      
      Reviewers: sdong, anthony, IslamAbdelRahman, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47793
      da1cf8a9
    • A
      Fix accidental object copy in transactions · 5a51fa90
      agiardullo 提交于
      Summary: Should have used auto& instead of auto.  Also needed to change the code a bit due to const correctness.
      
      Test Plan: unit tests
      
      Reviewers: sdong, igor, yoshinorim, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47787
      5a51fa90
    • Y
      Better handling of deprecated options in RocksDBOptionsParser · 1e73b11a
      Yueh-Hsuan Chiang 提交于
      Summary:
      Previously, we treat deprecated options as normal options in
      RocksDBOptionsParser.  However, these deprecated options should
      not be verified and serialized.
      
      Test Plan: options_test
      
      Reviewers: igor, sdong, IslamAbdelRahman, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47775
      1e73b11a
    • Y
      Fixed a compile warning in options_test.cc under clang · a8b8295d
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the following compile warning in options_test.cc under clang
      util/options_test.cc:94:12: error: 'Skip' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
          Status Skip(uint64_t n) {
                 ^
      ./include/rocksdb/env.h:368:18: note: overridden virtual function is here
        virtual Status Skip(uint64_t n) = 0;
                       ^
      
      Test Plan: options_test
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47763
      a8b8295d
    • Y
      RocksDB Options file format and its serialization / deserialization. · 74b100ac
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch defines the format of RocksDB options file, which
      follows the INI file format, and implements functions for its
      serialization and deserialization.  An example RocksDB options
      file can be found in examples/rocksdb_option_file_example.ini.
      
      A typical RocksDB options file has three sections, which are
      Version, DBOptions, and more than one CFOptions.  The RocksDB
      options file in general follows the basic INI file format
      with the following extensions / modifications:
       * Escaped characters
         We escaped the following characters:
          - \n -- line feed - new line
          - \r -- carriage return
          - \\ -- backslash \
          - \: -- colon symbol :
          - \# -- hash tag #
       * Comments
         We support # style comments.  Comments can appear at the ending
         part of a line.
       * Statements
         A statement is of the form option_name = value.
         Each statement contains a '=', where extra white-spaces
         are supported. However, we don't support multi-lined statement.
         Furthermore, each line can only contain at most one statement.
       * Section
         Sections are of the form [SecitonTitle "SectionArgument"],
         where section argument is optional.
       * List
         We use colon-separated string to represent a list.
         For instance, n1:n2:n3:n4 is a list containing four values.
      
      Below is an example of a RocksDB options file:
      
      [Version]
        rocksdb_version=4.0.0
        options_file_version=1.0
      [DBOptions]
        max_open_files=12345
        max_background_flushes=301
      [CFOptions "default"]
      [CFOptions "the second column family"]
      [CFOptions "the third column family"]
      
      Test Plan: Added many tests in options_test.cc
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: maykov, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46059
      74b100ac
    • I
      Merge pull request #741 from yuslepukhin/test_appveyor_baseline · 75134f75
      Igor Canadi 提交于
      Improve CI build and build switches
      75134f75
    • D
      Improve CI build and build switches · 2e7506d8
      Dmitri Smirnov 提交于
        Add an optimized build config switch for faster test runs
        Change compiler options to introduce more opitmizations and be more inline with MS internal switches.
        Make appveyor build to utilize all the avaiable cores on the VM (parallel)
        Introduce new appveyor configuration for daily test runs as it would take too long
        to run db_test after each checkin even in paralell.
        With some exclusions we make it in 38 minutes. We currently fail to install ramdisk during the build.
        Add a powershell script to faicilitate paralell run for db_test cases.
      2e7506d8
    • I
      Remove non-existing functions. Closes #680 · 1eff1834
      Igor Canadi 提交于
      Summary: See https://github.com/facebook/rocksdb/issues/680
      
      Test Plan: compiles
      
      Reviewers: sdong, yhchiang, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47721
      1eff1834
  8. 29 9月, 2015 1 次提交