1. 07 8月, 2015 1 次提交
    • A
      Fixing endless loop if seeking to end of key with seq num 0 · d7314ba7
      Andres Noetzli 提交于
      Summary:
      When seeking to the last occurrence of a key with sequence number 0, db_iter
      ends up in an endless loop because it seeks to type kValueTypeForSeek
      which is larger than kTypeDeletion/kTypeValue. Added test case that triggers
      the behavior.
      
      Test Plan: make clean all check
      
      Reviewers: igor, rven, anthony, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43653
      d7314ba7
  2. 06 8月, 2015 12 次提交
    • S
      Add util/delete_scheduler_impl.cc to CMakeLists.txt · 48e6e9aa
      sdong 提交于
      Summary: util/delete_scheduler_impl.cc is missing CMakeLists.txt, which fails Windows build. Add it.
      
      Test Plan: Build in both of Windows and Linux
      
      Reviewers: anthony, rven, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D43641
      48e6e9aa
    • S
      Add Statistics.getHistogramString() to print more detailed outputs of a histogram · c7742452
      sdong 提交于
      Summary:
      Provide a way for users to know more detailed ditribution of a histogram metrics. Example outputs:
      
      Manually add statement
        fprintf(stdout, "%s\n", dbstats->getHistogramString(SST_READ_MICROS).c_str());
      Will print out something like:
      
      Count: 989151  Average: 1.7659  StdDev: 1.52
      Min: 0.0000  Median: 1.2071  Max: 860.0000
      Percentiles: P50: 1.21 P75: 1.70 P99: 5.12 P99.9: 13.67 P99.99: 21.70
      ------------------------------------------------------
      [       0,       1 )   390839  39.513%  39.513% ########
      [       1,       2 )   500918  50.641%  90.154% ##########
      [       2,       3 )    79358   8.023%  98.177% ##
      [       3,       4 )     6297   0.637%  98.813%
      [       4,       5 )     1712   0.173%  98.986%
      [       5,       6 )     1134   0.115%  99.101%
      [       6,       7 )     1222   0.124%  99.224%
      [       7,       8 )     1529   0.155%  99.379%
      [       8,       9 )     1264   0.128%  99.507%
      [       9,      10 )      988   0.100%  99.607%
      [      10,      12 )     1378   0.139%  99.746%
      [      12,      14 )     1828   0.185%  99.931%
      [      14,      16 )      410   0.041%  99.972%
      [      16,      18 )       72   0.007%  99.980%
      [      18,      20 )       67   0.007%  99.986%
      [      20,      25 )      106   0.011%  99.997%
      [      25,      30 )       24   0.002%  99.999%
      [      30,      35 )        1   0.000% 100.000%
      [     250,     300 )        2   0.000% 100.000%
      [     300,     350 )        1   0.000% 100.000%
      [     800,     900 )        1   0.000% 100.000%
      
      Test Plan: Manually add a print in db_bench and make sure it prints out as expected. Will add some codes to cover the function
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D43611
      c7742452
    • I
      Make DeleteScheduler tests more reliable · 29b028b0
      Islam AbdelRahman 提交于
      Summary: Update DeleteScheduler tests so that they verify the used penalties for waiting instead of measuring the time spent which is not reliable
      
      Test Plan:
      make -j64 delete_scheduler_test && ./delete_scheduler_test
      COMPILE_WITH_TSAN=1 make -j64 delete_scheduler_test && ./delete_scheduler_test
      COMPILE_WITH_ASAN=1 make -j64 delete_scheduler_test && ./delete_scheduler_test
      
      make -j64 db_test && ./db_test --gtest_filter="DBTest.RateLimitedDelete:DBTest.DeleteSchedulerMultipleDBPaths"
      COMPILE_WITH_TSAN=1 make -j64 db_test && ./db_test --gtest_filter="DBTest.RateLimitedDelete:DBTest.DeleteSchedulerMultipleDBPaths"
      COMPILE_WITH_ASAN=1 make -j64 db_test && ./db_test --gtest_filter="DBTest.RateLimitedDelete:DBTest.DeleteSchedulerMultipleDBPaths"
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D43635
      29b028b0
    • S
      valgrind_check to exit on test failures · fca88f8e
      sdong 提交于
      Summary: Currently, valgrind_check doesn't fail on test failures, which creates confusion. valgrind_check should fail if test fails.
      
      Test Plan: Manually change tests to return test failure or cause memory leak and see valgrind_check has the correct behavior.
      
      Reviewers: anthony, yhchiang, IslamAbdelRahman, igor, kradhakrishnan, rven
      
      Reviewed By: rven
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D43629
      fca88f8e
    • P
      Fix build failure · 7d364d0d
      Poornima Chozhiyath Raman 提交于
      Summary: fix the build failure
      
      Test Plan: make all
      
      Reviewers: sdong, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43623
      7d364d0d
    • P
      Add function 'GetInfoLogList()' · 960d936e
      Poornima Chozhiyath Raman 提交于
      Summary: The list of info log files of a db can be obtained using the new function.
      
      Test Plan: New test in db_test.cc passed.
      
      Reviewers: yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: IslamAbdelRahman, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D41715
      960d936e
    • S
      Add two unit tests for SyncWAL() · 7ccd1c80
      sdong 提交于
      Summary:
      Add two unit tests for SyncWAL(). One makes sure SyncWAL() doesn't block writes in the other thread. Another one makes sure SyncWAL() doesn't wait ongoing writes to finish before being executed.
      
      Create a new test file db_wal_test and move two WAL related tests from db_test to here.
      
      Test Plan: Run the new tests
      
      Reviewers: IslamAbdelRahman, rven, kradhakrishnan, kolmike, tnovak, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D43605
      7ccd1c80
    • S
      Add statistic histogram "rocksdb.sst.read.micros" · 3ae386ea
      sdong 提交于
      Summary: Measure read latency histogram and put in statistics. Compaction inputs are excluded from it when possible (unfortunately usually no possible as we usually take table reader from table cache.
      
      Test Plan:
      Run db_bench and it shows the stats, like:
      
      rocksdb.sst.read.micros statistics Percentiles :=> 50 : 1.238522 95 : 2.529740 99 : 3.912180
      
      Reviewers: kradhakrishnan, rven, anthony, IslamAbdelRahman, MarkCallaghan, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D43275
      3ae386ea
    • S
      "make commit-prereq" should clean up rocksjava properly · 8ecb51a7
      sdong 提交于
      Summary: "make commit-prereq" fails to clean up java, which can cause rocksjava failure.
      
      Test Plan: Run commit-prepreq
      
      Reviewers: IslamAbdelRahman, rven, kradhakrishnan, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D43575
      8ecb51a7
    • I
      Enable DBTest.FlushSchedule under TSAN · 9aec75fb
      Islam AbdelRahman 提交于
      Summary: This patch will fix the false positive of DBTest.FlushSchedule under TSAN, we dont need to disable this test
      
      Test Plan: COMPILE_WITH_TSAN=1 make -j64 db_test && ./db_test --gtest_filter="DBTest.FlushSchedule"
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D43599
      9aec75fb
    • I
      Fix TSAN for delete_scheduler_test · bd2fc5f5
      Islam AbdelRahman 提交于
      Summary: Fixing TSAN false positive and relaxing the conditions when we are running under TSAN
      
      Test Plan: COMPILE_WITH_TSAN=1 make -j64 delete_scheduler_test && ./delete_scheduler_test
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D43593
      bd2fc5f5
    • S
      Fix misplaced position for reversing iterator direction while current key is a merge · 8e01bd11
      sdong 提交于
      Summary:
      While doing forward iterating, if current key is merge, internal iterator position is placed to the next key. If Prev() is called now, needs to do extra Prev() to recover the location.
      This is second attempt of fixing after reverting ec70fea4. This time shrink the fix to only merge key is the current key and avoid the reseeking logic for max_iterating skipping
      
      Test Plan: enable the two disabled tests and make sure they pass
      
      Reviewers: rven, IslamAbdelRahman, kradhakrishnan, tnovak, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D43557
      8e01bd11
  3. 05 8月, 2015 23 次提交
  4. 04 8月, 2015 4 次提交
    • Y
      Fix compile warning in compact_on_deletion_collector in some environment · be8621ff
      Yueh-Hsuan Chiang 提交于
      Summary: Fix compile warning in compact_on_deletion_collector some environment
      
      Test Plan: make
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43467
      be8621ff
    • Y
      Add CompactOnDeletionCollector in utilities/table_properties_collectors. · 26894303
      Yueh-Hsuan Chiang 提交于
      Summary:
      This diff adds CompactOnDeletionCollector in utilities/table_properties_collectors,
      which applies a sliding window to a sst file and mark this file as need-compaction
      when it observe enough deletion entries within the consecutive keys covered by
      the sliding window.
      
      Test Plan: compact_on_deletion_collector_test
      
      Reviewers: igor, anthony, IslamAbdelRahman, kradhakrishnan, yoshinorim, sdong
      
      Reviewed By: sdong
      
      Subscribers: maykov, dhruba
      
      Differential Revision: https://reviews.facebook.net/D41175
      26894303
    • V
      Fix CompactFiles by adding all necessary files · 20b244fc
      Venkatesh Radhakrishnan 提交于
      Summary:
      The compact files API had a bug where some overlapping files
      are not added. These are files which overlap with files which were
      added to the compaction input files, but not to the original set of
      input files. This happens only when there are more than two levels
      involved in the compaction. An example will illustrate this better.
      
      Level 2 has 1 input file 1.sst which spans [20,30].
      
      Level 3 has added file  2.sst which spans [10,25]
      
      Level 4 has file 3.sst which spans [35,40] and
              input file 4.sst which spans [46,50].
      
      The existing code would not add 3.sst to the set of input_files because
      it only becomes an overlapping file in level 4 and it wasn't one in
      level 3.
      
      When installing the results of the compaction, 3.sst would overlap with
      output file from the compact files and result in the assertion in
      version_set.cc:1130
      
       // Must not overlap
         assert(level <= 0 || level_files->empty() ||
                  internal_comparator_->Compare(
                      (*level_files)[level_files->size() - 1]->largest, f->smallest) <
                      0);
      This change now adds overlapping files from the current level to the set
      of input files also so that we don't hit the assertion above.
      
      Test Plan:
      d=/tmp/j; rm -rf $d; seq 1000 | parallel --gnu --eta
      'd=/tmp/j/d-{}; mkdir -p $d; TEST_TMPDIR=$d ./db_compaction_test
      --gtest_filter=*CompactilesOnLevel* --gtest_also_run_disabled_tests >&
      '$d'/log-{}'
      
      Reviewers: igor, yhchiang, sdong
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43437
      20b244fc
    • V
      Make SuggestCompactRangeNoTwoLevel0Compactions deterministic · 87df6295
      Venkatesh Radhakrishnan 提交于
      Summary:
      Made SuggestCompactRangeNoTwoLevel0Compactions by forcing
      a flush after generating a file and waiting for compaction at the end.
      
      Test Plan: Run SuggestCompactRangeNoTwoLevel0Compactions
      
      Reviewers: yhchiang, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43449
      87df6295