1. 01 10月, 2015 2 次提交
    • 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
  2. 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
  3. 29 9月, 2015 6 次提交
    • I
      Clear SyncPoint Trace in DeleteSchedulerTests · 16d1ba70
      Islam AbdelRahman 提交于
      Summary: DeleteSchedulerTests is running the same test with different rates, After the first iteraton sync points become useless because ClearTrace was not being called
      
      Test Plan: Run the test
      
      Reviewers: sdong, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D47709
      16d1ba70
    • Y
      Make CompactionJobStatsTest.UniversalCompactionTest more robust · 30f74fa9
      Yueh-Hsuan Chiang 提交于
      Summary:
      CompactionJobStatsTest.UniversalCompactionTest assumes compaction
      kicks in when the number of L0 files equals to the compaction trigger.
      However, in some case, the compaction might not catch up the write
      speed and thus compaction might not kick in until the number of L0 files
      is GREATER than the compaction trigger.
      
      This patch tries to fix this corner case by making the Put thread wait
      for a potential compaction whenever it flushes.
      
      Test Plan: ./compaction_job_stats_test
      
      Reviewers: sdong, anthony, IslamAbdelRahman, igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D47589
      30f74fa9
    • A
      SingleDelete support for Transactions · afe0dc53
      agiardullo 提交于
      Summary: Transactional SingleDelete is needed for MyRocks.  Note: This diff requires D47529.
      
      Test Plan: Added some new tests in this diff as well as more tests added in D47529
      
      Reviewers: rven, sdong, igor, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: yoshinorim, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47535
      afe0dc53
    • Y
      Fixed a tsan warning in db_stress.cc · a263002a
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the following tsan warning in db_stress.cc
      
        WARNING: ThreadSanitizer: data race (pid=3163194)
        Read of size 8 at 0x7fd1797cb518 by thread T32:
          #0 VerifyDb tools/db_stress.cc:1731 (db_stress+0x000000040674)
          #1 rocksdb::StressTest::ThreadBody(void*) tools/db_stress.cc:1191 (db_stress+0x0000000625a9)
          #2 StartThreadWrapper util/env_posix.cc:1648 (db_stress+0x00000028bbbd)
      
        Previous write of size 8 at 0x7fd1797cb518 by thread T31:
          #0 VerifyDb tools/db_stress.cc:1726 (db_stress+0x00000004072a)
          #1 rocksdb::StressTest::ThreadBody(void*) tools/db_stress.cc:1191 (db_stress+0x0000000625a9)
          #2 StartThreadWrapper util/env_posix.cc:1648 (db_stress+0x00000028bbbd)
      
      The cause is that in VerifyDb(), the static local const variable long max_key
      can be read and written at the same time.  This patch fixed it by making it
      non-static.
      
      Test Plan: db_stress
      
      Reviewers: igor, sdong, IslamAbdelRahman, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47703
      a263002a
    • Y
      Fixed a compile error in util/arena.h · e4861e7d
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the compile error in util/arena.h caused by not
      including TLB related header.
      
      Test Plan: make db_stress
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47697
      e4861e7d
    • Y
      Fixed a compile warning in util/arena.cc when hugetlb is not supported. · 0fdb4f16
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the following compile warning when hugetlb is not supported.
      
          ./util/arena.h:102:10: error: private field 'hugetlb_size_' is not used [-Werror,-Wunused-private-field]
            size_t hugetlb_size_ = 0;
                   ^
          1 error generated.
      
      Test Plan: make db_stress
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47691
      0fdb4f16
  4. 27 9月, 2015 1 次提交
  5. 26 9月, 2015 10 次提交
  6. 25 9月, 2015 1 次提交
    • K
      Parameterizing email id · e01f32cc
      krad 提交于
      Summary: Removing the leveldb@fb.com and making it a command line argument
      
      Test Plan: Manual test
      
      Reviewers:
      
      CC: leveldb@
      
      Task ID: #6968635
      
      Blame Rev:
      e01f32cc
  7. 24 9月, 2015 9 次提交
    • M
      Fix valgrind failure due to memory leaks · c58bac70
      Mayank Pundir 提交于
      Summary: Test cases for IsBottommostLevel function create FileMetaData objects which were not getting deleted in the destructor.
      
      Test Plan: Valgrind check on compaction_picker_test
      
      Reviewers: yhchiang, igor, sdong
      
      Subscribers: rven, kradhakrishnan, IslamAbdelRahman, dhruba, anthony
      
      Differential Revision: https://reviews.facebook.net/D47463
      c58bac70
    • S
      Fix the bug of using freed memory introduced by recent plain table reader patch · a70d08ec
      sdong 提交于
      Summary: Recent patch introduced a bug that if non-mmap mode is used, in prefix encoding case, there is a resizing of cur_key_ within the same prefix, we still read prefix from the released buffer. It fails ASAN tests and this commit fixes it.
      
      Test Plan: Run the ASAN tests for the failing test case.
      
      Reviewers: IslamAbdelRahman, yhchiang, anthony, igor, kradhakrishnan, rven
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D47457
      a70d08ec
    • K
      Simplifying valgrind testing · 628216fc
      krad 提交于
      Summary: Our valgrind testing is buggy and cumbersome in terms of locating the
      error. It originates from the fact we accumulate all output for the tests. It is
      extremely hard to locate the point of error.
      
      The communication between valgrind and the script is not sturdy. We are
      experiencing bugs.
      
      Simplifying to stop on first error.
      
      Test Plan: Run manually
      
      Reviewers: sdong igor
      
      CC: leveldb@
      
      Task ID: #6968635
      
      Blame Rev:
      628216fc
    • A
      Remove ldb HexToString method's usage of sscanf · 4805fa0e
      Assaf Sela 提交于
      Summary:
      Fix hex2String performance issues by removing sscanf dependency.
      Also fixed some edge case handling (odd length, bad input).
      
      Test Plan: Created a test file which called old and new implementation, and validated results are the same. I'll paste results in the phabricator diff.
      
      Reviewers: igor, rven, anthony, IslamAbdelRahman, kradhakrishnan, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: thatsafunnyname, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D46785
      4805fa0e
    • I
      Add experimental DB::AddFile() to plug sst files into empty DB · f03b5c98
      Islam AbdelRahman 提交于
      Summary:
      This is an initial version of bulk load feature
      
      This diff allow us to create sst files, and then bulk load them later, right now the restrictions for loading an sst file are
      (1) Memtables are empty
      (2) Added sst files have sequence number = 0, and existing values in database have sequence number = 0
      (3) Added sst files values are not overlapping
      
      Test Plan: unit testing
      
      Reviewers: igor, ott, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb, ott, dhruba
      
      Differential Revision: https://reviews.facebook.net/D39081
      f03b5c98
    • Y
      Fixed old lint errors in db/filename.cc · 3fdb6e52
      Yueh-Hsuan Chiang 提交于
      Summary: Fixed old lint errors in db/filename.cc
      
      Test Plan: make
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47445
      3fdb6e52
    • Y
      Fixed old lint errors in db/filename.h · b349d227
      Yueh-Hsuan Chiang 提交于
      Summary: Fixed old lint errors in db/filename.h
      
      Test Plan: make
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47439
      b349d227
    • S
      PlainTableReader to support non-mmap mode · df34aea3
      sdong 提交于
      Summary:
      PlainTableReader now only allows mmap-mode. Add the support to non-mmap mode for more flexibility.
      Refactor the codes to move all logic of reading data to PlainTableKeyDecoder, and consolidate the calls to Read() call and ReadVarint32() call. Implement the calls for both of mmap and non-mmap case seperately. For non-mmap mode, make copy of keys in several places when we need to move the buffer after reading the keys.
      
      Test Plan: Add the mode of non-mmap case in plain_table_db_test. Run it in valgrind mode too.
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D47187
      df34aea3
    • S
      RandomAccessFileReader should not inherit RandomAccessFile · d746eaad
      sdong 提交于
      Summary: RandomAccessFileReader unnecessarily inherited RandomAccessFile, which can introduce unnecessarily extra costs. Remove it.
      
      Test Plan: Run all existing tests
      
      Reviewers: yhchiang, anthony, igor, kradhakrishnan, rven, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D47409
      d746eaad
  8. 23 9月, 2015 3 次提交