1. 15 3月, 2016 3 次提交
  2. 13 3月, 2016 2 次提交
    • A
      Update change log for 4.6 release · 0267655d
      Andrew Kryczka 提交于
      Summary: as titled
      
      Test Plan: N/A
      
      Reviewers: sdong, kradhakrishnan, anthony, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55323
      0267655d
    • A
      Expose RepairDB as ldb command · 08304c08
      Andrew Kryczka 提交于
      Summary: This will make it easier for admins and devs to use RepairDB.
      
      Test Plan:
      Tried deleting the manifest and verified it recovers:
      
        $ ldb --create_if_missing --db=/tmp/test_db put ok ok
        $ rm -f /tmp/test_db/MANIFEST-000001
        $ ./ldb --db=/tmp/test_db repair
        $ ldb --db=/tmp/test_db get ok
        ok
      
      Reviewers: yhchiang, sdong, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55359
      08304c08
  3. 12 3月, 2016 3 次提交
    • I
      Aggregate hot Iterator counters in LocalStatistics (DBIter::Next perf regression) · 580fede3
      Islam AbdelRahman 提交于
      Summary:
      This patch bump the counters in the frequent code path DBIter::Next() / DBIter::Prev() in a local data members and send them to Statistics when the iterator is destroyed
      A better solution will be to have thread_local implementation for Statistics
      
      New performance
      ```
      readseq      :       0.035 micros/op 28597881 ops/sec; 3163.7 MB/s
           1,851,568,819      stalled-cycles-frontend   #   31.29% frontend cycles idle    [49.86%]
             884,929,823      stalled-cycles-backend    #   14.95% backend  cycles idle    [50.21%]
      readreverse  :       0.071 micros/op 14077393 ops/sec; 1557.3 MB/s
           3,239,575,993      stalled-cycles-frontend   #   27.36% frontend cycles idle    [49.96%]
           1,558,253,983      stalled-cycles-backend    #   13.16% backend  cycles idle    [50.14%]
      
      ```
      
      Existing performance
      
      ```
      readreverse  :       0.174 micros/op 5732342 ops/sec;  634.1 MB/s
          20,570,209,389      stalled-cycles-frontend   #   70.71% frontend cycles idle    [50.01%]
          18,422,816,837      stalled-cycles-backend    #   63.33% backend  cycles idle    [50.04%]
      
      readseq      :       0.119 micros/op 8400537 ops/sec;  929.3 MB/s
          15,634,225,844      stalled-cycles-frontend   #   79.07% frontend cycles idle    [49.96%]
          14,227,427,453      stalled-cycles-backend    #   71.95% backend  cycles idle    [50.09%]
      ```
      
      Test Plan: unit tests
      
      Reviewers: yhchiang, sdong, igor
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55107
      580fede3
    • A
      Add multithreaded transaction test · 79025280
      agiardullo 提交于
      Summary: Refactored db_bench transaction stress tests so that they can be called from unit tests as well.
      
      Test Plan: run new unit test as well as db_bench
      
      Reviewers: yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55203
      79025280
    • B
      fix: handle_fatal_signal (sig=6) in std::vector<std::string,... · e8e6cf01
      Baris Yazici 提交于
      fix: handle_fatal_signal (sig=6) in std::vector<std::string, std::allocator<std::string> >::_M_range_check | c++/4.8.2/bits/stl_vector.h:794 #174
      
      Summary:
      Fix for https://github.com/facebook/mysql-5.6/issues/174
      
      When there is no old files to purge, vector.at(i) function was crashing
      
      if (old_info_log_file_count != 0 &&
            old_info_log_file_count >= db_options_.keep_log_file_num) {
          std::sort(old_info_log_files.begin(), old_info_log_files.end());
          size_t end = old_info_log_file_count - db_options_.keep_log_file_num;
          for (unsigned int i = 0; i <= end; i++) {
            std::string& to_delete = old_info_log_files.at(i);
      
      Added check to old_info_log_file_count be non zero.
      
      Test Plan: run existing tests
      
      Reviewers: gunnarku, vasilep, sdong, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: andrewkr, webscalesql-eng, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55245
      e8e6cf01
  4. 11 3月, 2016 5 次提交
    • A
      Cleanup stale manifests outside of full purge · d9620239
      Andrew Kryczka 提交于
      Summary:
      - Keep track of obsolete manifests in VersionSet
      - Updated FindObsoleteFiles() to put obsolete manifests in the JobContext for later use by PurgeObsoleteFiles()
      - Added test case that verifies a stale manifest is deleted by a non-full purge
      
      Test Plan:
        $ ./backupable_db_test --gtest_filter=BackupableDBTest.ChangeManifestDuringBackupCreation
      
      Reviewers: IslamAbdelRahman, yoshinorim, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55269
      d9620239
    • Y
      Cache to have an option to fail Cache::Insert() when full · f71fc77b
      Yi Wu 提交于
      Summary:
      Cache to have an option to fail Cache::Insert() when full. Update call sites to check status and handle error.
      
      I totally have no idea what's correct behavior of all the call sites when they encounter error. Please let me know if you see something wrong or more unit test is needed.
      
      Test Plan: make check -j32, see tests pass.
      
      Reviewers: anthony, yhchiang, andrewkr, IslamAbdelRahman, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D54705
      f71fc77b
    • I
      Merge pull request #938 from alexander-fenster/master · ee8cc352
      Igor Canadi 提交于
      added --no_value option to ldb scan to dump key only
      ee8cc352
    • Y
      Update compaction score right after CompactFiles forms a compaction · 765597fa
      Yueh-Hsuan Chiang 提交于
      Summary:
      This is a follow-up patch of https://reviews.facebook.net/D54891.
      As the information about files being compacted will also be used
      when making compaction decision, it is necessary to update the compaction
      score when a compaction plan has been made but not yet execute.
      
      This patch adds a missing call to update the compaction score in
      CompactFiles().
      
      Test Plan: compact_files_test
      
      Reviewers: sdong, IslamAbdelRahman, kradhakrishnan, yiwu, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55227
      765597fa
    • A
      formatting fix · f0161c37
      Alexander Fenster 提交于
      f0161c37
  5. 09 3月, 2016 1 次提交
  6. 08 3月, 2016 4 次提交
  7. 05 3月, 2016 4 次提交
    • S
      Change Property name from "rocksdb.current_version_number" to... · 294bdf9e
      sdong 提交于
      Change Property name from "rocksdb.current_version_number" to "rocksdb.current-super-version-number"
      
      Summary: I realized I again is wrong about the naming convention. Let me change it to the correct one.
      
      Test Plan: Run unit tests.
      
      Reviewers: IslamAbdelRahman, kradhakrishnan, yhchiang, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55041
      294bdf9e
    • Y
      Use pure if-then check instead of assert in EraseColumnFamilyInfo · bf1c4089
      Yueh-Hsuan Chiang 提交于
      Summary:
      Use pure if-then check instead of assert in EraseColumnFamilyInfo
      when the specified column family does not found in the cf_info_map_.
      So the second deletion will be no op instead of crash.
      
      Test Plan: existing test.
      
      Reviewers: sdong, anthony, kradhakrishnan, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55023
      bf1c4089
    • Y
      Fix a bug where flush does not happen when a manual compaction is running · a7d4eb2f
      Yueh-Hsuan Chiang 提交于
      Summary:
      Currently, when rocksdb tries to run manual compaction to refit data into a level,
      there's a ReFitLevel() process that requires no bg work is currently running.
      When RocksDB plans to ReFitLevel(), it will do the following:
      
       1. pause scheduling new bg work.
       2. wait until all bg work finished
       3. do the ReFitLevel()
       4. unpause scheduling new bg work.
      
      However, as it pause scheduling new bg work at step one and waiting for all bg work
      finished in step 2, RocksDB will stop flushing until all bg work is done (which
      could take a long time.)
      
      This patch fix this issue by changing the way ReFitLevel() pause the background work:
      
      1. pause scheduling compaction.
      2. wait until all bg work finished.
      3. pause scheduling flush
      4. do ReFitLevel()
      5. unpause both flush and compaction.
      
      The major difference is that.  We only pause scheduling compaction in step 1 and wait
      for all bg work finished in step 2.  This prevent flush being blocked for a long time.
      Although there's a very rare case that ReFitLevel() might be in starvation in step 2,
      but it's less likely the case as flush typically finish very fast.
      
      Test Plan: existing test.
      
      Reviewers: anthony, IslamAbdelRahman, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55029
      a7d4eb2f
    • G
      Update benchmarks used to measure subcompaction performance · 68189f7e
      Gunnar Kudrjavets 提交于
      Summary: After closely working with Mark, Siying, and Yueh-Hsuan this set of changes reflects the updates needed to measure RocksDB subcompaction performance in a correct manner. The essence of the benchmark is executing `fillrandom` followed by `compact` with the correct set of options for various number of subcompactions specified.
      
      Test Plan: Tested internally to verify correctness and reliability.
      
      Reviewers: sdong, yhchiang, MarkCallaghan
      
      Reviewed By: MarkCallaghan
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D55089
      68189f7e
  8. 04 3月, 2016 4 次提交
  9. 03 3月, 2016 4 次提交
    • S
      Compaction always needs to be removed from level0_compactions_in_progress_ for universal compaction · ef204df7
      sdong 提交于
      Summary: We always put compaction to level0_compactions_in_progress_ for universal compaction, so we should also remove it. The bug causes assert failure when running manual compaction.
      
      Test Plan:
      TEST_TMPDIR=/dev/shm/ ./db_bench --benchmarks=fillrandom,compact --subcompactions=16 --compaction_style=1
      always fails on my host. After the fix, it doesn't fail any more.
      
      Reviewers: IslamAbdelRahman, andrewkr, kradhakrishnan, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55017
      ef204df7
    • S
      Add Iterator Property rocksdb.iterator.version_number · e79ad9e1
      sdong 提交于
      Summary: We want to provide a way to detect whether an iterator is stale and needs to be recreated. Add a iterator property to return version number.
      
      Test Plan: Add two unit tests for it.
      
      Reviewers: IslamAbdelRahman, yhchiang, anthony, kradhakrishnan, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54921
      e79ad9e1
    • S
      Subcompaction boundary keys should not terminate after an empty level · 19ea40f8
      sdong 提交于
      Summary: Now we skip to add boundary keys to subcompaction candidates since we see an empty level. This makes subcompaction almost disabled for universal compaction. We should consider all files instead.
      
      Test Plan: Run existing tests.
      
      Reviewers: IslamAbdelRahman, andrewkr, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D55005
      19ea40f8
    • O
      Add parsing of missing DB options · deb08b82
      Omar Sandoval 提交于
      Summary: There are a few options in struct DBOptions that aren't handled by options_helper.cc. Add those missing options so they can be used by GetDBOptionsFromString() and friends.
      
      Test Plan: Updated options_test.cc, reran all tests.
      
      Reviewers: sdong, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D54603
      deb08b82
  10. 02 3月, 2016 6 次提交
    • A
      Get file attributes in bulk for VerifyBackup and CreateNewBackup · f8e90e87
      Andrew Kryczka 提交于
      Summary:
      For VerifyBackup(), backup files can be spread across "shared/",
      "shared_checksum/", and "private/" subdirectories, so we have to
      bulk get all three.
      
      For CreateNewBackup(), we make two separate bulk calls: one for the
      data files and one for WAL files.
      
      There is also a new helper function, ExtendPathnameToSizeBytes(),
      that translates the file attributes vector to a map. I decided to leave
      GetChildrenFileAttributes()'s (from D53781) return type as vector to
      keep it consistent with GetChildren().
      
      Depends on D53781.
      
      Test Plan:
      verified relevant unit tests
      
        $ ./backupable_db_test
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D53919
      f8e90e87
    • S
      Change BlockBasedTableOptions.format_version default to 2 · 12fd9b18
      sdong 提交于
      Summary: BlockBasedTableOptions.format_version = 2 uses better encoding format. Now it's the time to make it default.
      
      Test Plan: Run all existing tests.
      
      Reviewers: igor, yhchiang, anthony, kradhakrishnan, andrewkr, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: MarkCallaghan, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54879
      12fd9b18
    • S
      Update current version to 4.6 · 4572a2d8
      sdong 提交于
      Summary: 4.5 is already cut, we can now increase the version in 4.6.
      
      Test Plan: Not needed.
      
      Reviewers: anthony, kradhakrishnan, andrewkr, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54963
      4572a2d8
    • S
      Rename iterator property "rocksdb.iterator.is.key.pinned" => "rocksdb.iterator.is-key-pinned" · 74b66070
      sdong 提交于
      Summary: Rename iterator property to folow property naming convention.
      
      Test Plan: Run all existing tests.
      
      Reviewers: andrewkr, anthony, yhchiang, kradhakrishnan, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54957
      74b66070
    • I
      Fix DB::AddFile() issue when PurgeObsoleteFiles() is called · 6743135e
      Islam AbdelRahman 提交于
      Summary:
      In some situations the DB will scan all existing files in the DB path and delete the ones that are Obsolete.
      If this happen during adding an external sst file. this could cause the file to be deleted while we are adding it.
      This diff fix this issue
      
      Test Plan:
      unit test to reproduce the bug
      existing unit tests
      
      Reviewers: sdong, yhchiang, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D54627
      6743135e
    • S
      Add DB Property "rocksdb.current_version_number" · 432f3adf
      sdong 提交于
      Summary: Add a DB Property "rocksdb.current_version_number" for users to monitor version changes and stale iterators.
      
      Test Plan: Add a unit test.
      
      Reviewers: andrewkr, yhchiang, kradhakrishnan, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54927
      432f3adf
  11. 01 3月, 2016 4 次提交
    • S
      Recompute compaction score after scheduling manual compaction · b5b1db16
      sdong 提交于
      Summary: After we made manual compaction runnable concurrently with automaticallly compaction, we need to run ComputeCompactionScore() to prepare a coming compaction picking call before the compaction finishes.
      
      Test Plan: Run existing tests.
      
      Reviewers: yhchiang, IslamAbdelRahman, andrewkr, kradhakrishnan, anthony, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54891
      b5b1db16
    • A
      TransactionDB:ReinitializeTransaction · 5ea9aa3c
      agiardullo 提交于
      Summary: Add function to reinitialize a transaction object so that it can be reused.  This is an optimization so users can potentially avoid reallocating transaction objects.
      
      Test Plan: added tests
      
      Reviewers: yhchiang, kradhakrishnan, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: jkedgar, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D53835
      5ea9aa3c
    • S
      Introduce Iterator::GetProperty() and replace Iterator::IsKeyPinned() · 1f595414
      sdong 提交于
      Summary:
      Add Iterator::GetProperty(), a way for users to communicate with iterator, and turn Iterator::IsKeyPinned() with it.
      As a follow-up, I'll ask a property as the version number attached to the iterator
      
      Test Plan: Rerun existing tests and add a negative test case.
      
      Reviewers: yhchiang, andrewkr, kradhakrishnan, anthony, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D54783
      1f595414
    • I
      Merge pull request #1020 from gongsu832/master · 67789419
      Igor Canadi 提交于
      Modified Makefile and build_tools/build_detect_platform to compile on…
      67789419