1. 30 6月, 2016 3 次提交
  2. 29 6月, 2016 2 次提交
    • W
      b726bf59
    • Y
      Improve regression_test.sh · faa7eb3b
      Yueh-Hsuan Chiang 提交于
      Summary:
      This diff makes the following improvement in regression_test.sh:
      
      1. Add NUM_OPS and DELETE_TEST_PATH to regression_test.sh:
      
        * NUM_OPS:  The number of operations that will be issued
          in EACH thread.
          Default: $NUM_KEYS / $NUM_THREADS
      
        * DELETE_TEST_PATH: If true, then the test directory
          will be deleted after the script ends.
          Default: 0
      2. Add more information in SUMMARY.csv
      3. Fix a bug in regression_test.sh where each thread in fillseq will all issue $NUM_KEYS writes.
      4. Add --deletes in db_bench, which allows us to control the number of deletes instead of must using FLAGS_num.
      
      Test Plan: run regression test with and without DELETE_TEST_PATH and NUM_OPS
      
      Reviewers: yiwu, sdong, IslamAbdelRahman, gunnarku
      
      Reviewed By: gunnarku
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D60039
      faa7eb3b
  3. 28 6月, 2016 2 次提交
  4. 25 6月, 2016 5 次提交
    • C
      fix simple typos (#1183) · 4f2b0946
      charsyam 提交于
      4f2b0946
    • A
      ColumnFamilyOptions API [CF + RepairDB part 3/3] · 3b7ed677
      Andrew Kryczka 提交于
      Summary:
      Overload RepairDB to take vector-of-ColumnFamilyDescriptor, which tells
      us CF name + options. Also takes a ColumnFamilyOptions for unspecified column
      families encountered during the repair.
      
      One potentially confusing thing is that we store options in the constructor and
      don't invoke AddColumnFamily() until discovering the CF in ScanTable. This is
      because we don't know the CF ID until we find a table belonging to that CF.
      
      Depends on D59781.
      
      Test Plan:
        $ ./repair_test
      
      Reviewers: yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D59853
      3b7ed677
    • A
      Detect column family from properties [CF + RepairDB part 2/3] · 56ac6862
      Andrew Kryczka 提交于
      Summary:
      This diff uses the CF ID and CF name properties in the SST file
      to associate recovered data with the proper column family. Depends on D59775.
      
      - In ScanTable(), create column families in VersionSet each time a new one is discovered (via reading SST file properties)
      - In ConvertLogToTable(), dump an SST file for every column family with data in the WAL
      - In AddTables(), make a VersionEdit per-column family that adds all of that CF's tables
      
      Test Plan:
        $ ./repair_test
      
      Reviewers: yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D59781
      56ac6862
    • W
      delete 2nd level children for default env · 3fc713ed
      Wanning Jiang 提交于
      Summary: ensure no 2nd level children under test_dir_
      
      Test Plan: env_basic_test on 4 envs
      
      Reviewers: andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59979
      3fc713ed
    • A
      Refactor to use VersionSet [CF + RepairDB part 1/3] · 343507af
      Andrew Kryczka 提交于
      Summary:
      To support column families, it is easiest to use VersionSet to manage
      our column families (if we don't have Versions then ColumnFamilyData always
      behaves as a dummy column family). This diff only refactors the existing repair
      logic to use VersionSet; the next two parts will add support for multiple
      column families.
      
      Test Plan:
        $ ./repair_test
      
      Reviewers: yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D59775
      343507af
  5. 24 6月, 2016 3 次提交
  6. 23 6月, 2016 3 次提交
  7. 22 6月, 2016 5 次提交
    • O
      Add a read option to enable background purge when cleaning up iterators · c4e19b77
      omegaga 提交于
      Summary:
      Add a read option `background_purge_on_iterator_cleanup` to avoid deleting files in foreground when destroying iterators.
      Instead, a job is scheduled in high priority queue and would be executed in a separate background thread.
      
      Test Plan: Add a variant of PurgeObsoleteFileTest. Turn on background purge option in the new test, and use sleeping task to ensure files are deleted in background.
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59499
      c4e19b77
    • I
      Update DB::AddFile() to ingest the file to the lowest possible level · fa813f74
      Islam AbdelRahman 提交于
      Summary:
      DB::AddFile() right now always add the ingested file to L0
      update the logic to add the file to the lowest possible level
      
      Test Plan: unit tests
      
      Reviewers: jkedgar, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, yoshinorim
      
      Differential Revision: https://reviews.facebook.net/D59637
      fa813f74
    • I
      Remove filter_deletes from crash_test · d6b79e2f
      Islam AbdelRahman 提交于
      Summary: filter_deletes option was removed, remove it from crash_test to fix it
      
      Test Plan: make crash_test
      
      Reviewers: yhchiang, andrewkr, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59901
      d6b79e2f
    • G
      Framework for enabling continuous RocksDB build and tests · a52e4d7d
      Gunnar Kudrjavets 提交于
      Summary:
      The main PHP code churn is caused by extracting the common code from `FacebookArcanistConfiguration.php` and `FacebookOldArcanistConfiguration.php` into `RocksDBCommonDeterminator.php`. This is necessary both for reducing the duplication of code and making sure that we can execute the common core logic separately from continuous runs.
      
      The main logic in `RocksDBCommonDeterminator.php` remains quite the same with the exception of some things:
      
      - Adding separation between the cases when a diff is submitted //vs.// when the code is triggered from a continuous run. There are certain actions which we should do in a case of diff only.
      
      - Adding reporting - now the person who authored the diff will receive e-mail notifications if any of the jobs have failed.
      
      - Enabling assertions and making sure that we'll terminate on failure. This is an internal code used by competent engineers, so instead of `if (!condition) { echo "Something"; exit(1); }` for every invariant I think that `assert(condition)` provides better readability with the same behavior. Especially taking into account that we're talking about things which shouldn't ever happen.
      
      Enabling this entire process will be triggered internally and will be a subject of a separate code review. We should discuss the details of triggering continuous RocksDB build and tests on that diff.
      
      Test Plan:
      - Make sure that `[p]arc diff` scenario isn't broken by verifying that tests validating this diff will pass.
      - Private testing of triggering the continuous build script.
      - Once the changes will land then author an internal job which will use the script and verify its validity.
      
      Reviewers: sdong, yhchiang, kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59811
      a52e4d7d
    • I
      Makefile warning for invalid paths in make_config.mk · f9bd6677
      Islam AbdelRahman 提交于
      Summary:
      Update Makefile to show warnings when we have invalid paths in our make_config.mk file
      
      sample output
      
      ```
      $ make static_lib -j64
      Makefile:150: Warning: /mnt/gvfs/third-party2/libgcc/53e0eac8911888a105aa98b9a35fe61cf1d8b278/4.9.x/gcc-4.9-glibc-2.20/024dbc3/libs dont exist
      Makefile:150: Warning: /mnt/gvfs/third-party2/llvm-fb/b91de48a4974ec839946d824402b098d43454cef/stable/centos6-native/7aaccbe/../../src/clang/tools/scan-build/scan-build dont exist
        GEN      util/build_version.cc
      ```
      
      Test Plan: check that warning is printed visually
      
      Reviewers: sdong, yiwu, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59523
      f9bd6677
  8. 21 6月, 2016 2 次提交
  9. 18 6月, 2016 2 次提交
    • S
      Deprectate filter_deletes · 7b79238b
      sdong 提交于
      Summary: filter_deltes is not a frequently used feature. Remove it.
      
      Test Plan: Run all test suites.
      
      Reviewers: igor, yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59427
      7b79238b
    • S
      Bulk load mode shouldn't stop ingest · 4939fc38
      sdong 提交于
      Summary: We introduced default slow down and stop condition, but didn't reset it in bulk load mode. Fix it.
      
      Test Plan: N/A
      
      Reviewers: igor, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59757
      4939fc38
  10. 17 6月, 2016 3 次提交
  11. 16 6月, 2016 3 次提交
  12. 15 6月, 2016 6 次提交
    • I
      Fix clang build · 8366e10f
      Islam AbdelRahman 提交于
      Summary: Fix clang build
      
      Test Plan: USE_CLANG=1 make check -j64
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59667
      8366e10f
    • S
      Move away from enum char value -1 · 0babce57
      sdong 提交于
      Summary: char is not signed in some platforms. Having negative values confuse those compilers.
      
      Test Plan: Run all existing tests.
      
      Reviewers: andrewkr, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59619
      0babce57
    • I
      Optimize BlockIter::Prev() by caching decoded entries · 812dbfb4
      Islam AbdelRahman 提交于
      Summary:
      Right now the way we do BlockIter::Prev() is like this
      
      - Go to the beginning of the restart interval
      - Keep moving forward (and decoding keys using ParseNextKey()) until we reach the desired key
      
      This can be optimized by caching the decoded entries in the first pass and reusing them in consecutive BlockIter::Prev() calls
      
      Before caching
      
      ```
      DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="readreverse" --db="/dev/shm/bench_prev_opt/" --use_existing_db --disable_auto_compactions
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.413 micros/op 2423972 ops/sec;  268.2 MB/s
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.414 micros/op 2413867 ops/sec;  267.0 MB/s
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.410 micros/op 2440881 ops/sec;  270.0 MB/s
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.414 micros/op 2417298 ops/sec;  267.4 MB/s
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.413 micros/op 2421682 ops/sec;  267.9 MB/s
      ```
      
      After caching
      
      ```
      DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="readreverse" --db="/dev/shm/bench_prev_opt/" --use_existing_db --disable_auto_compactions
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.324 micros/op 3088955 ops/sec;  341.7 MB/s
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.335 micros/op 2980999 ops/sec;  329.8 MB/s
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.341 micros/op 2929681 ops/sec;  324.1 MB/s
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.344 micros/op 2908490 ops/sec;  321.8 MB/s
      DB path: [/dev/shm/bench_prev_opt/]
      readreverse  :       0.338 micros/op 2958404 ops/sec;  327.3 MB/s
      ```
      
      Test Plan: COMPILE_WITH_ASAN=1 make check -j64
      
      Reviewers: andrewkr, yiwu, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, yoshinorim
      
      Differential Revision: https://reviews.facebook.net/D59463
      812dbfb4
    • K
      Minor bug fix with log name · 550bf895
      krad 提交于
      550bf895
    • I
      Fix examples/Makefile jemalloc error · 886af591
      Islam AbdelRahman 提交于
      Summary: compile and link with jemalloc in examples binaries
      
      Test Plan:
      cd examples
      make -j64
      
      Reviewers: andrewkr, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, yoshinorim
      
      Differential Revision: https://reviews.facebook.net/D59457
      886af591
    • A
      Expose save points in Java WriteBatch and WBWI (#1092) · e3b1e3df
      Adam Retter 提交于
      * Java API - Expose SetSavePoint and RollbackToRestorePoint for WriteBatch and WriteBatchWithIndex
      
      * Minor cleanup
      e3b1e3df
  13. 14 6月, 2016 1 次提交
    • I
      Remove wasteful instrumentation in FullMerge (stacked on D59577) · f5177c76
      Islam AbdelRahman 提交于
      Summary:
      [ This diff is stacked on top of D59577 ]
      
      We keep calling timer.ElapsedNanos() on every call to MergeOperator::FullMerge even when statistics are disabled, this is wasteful.
      
      I run the readseq benchmark on a DB containing 100K merge operands for 100K keys (1 operand per key) with 1GB block cache
      I see slight performance improvment
      
      Original results
      
      ```
      $ ./db_bench --benchmarks="readseq,readseq,readseq,readseq,readseq,readseq,readseq,readseq,readseq" --merge_operator="max" --merge_keys=100000 --num=100000 --db="/dev/shm/100K_merge_compacted/" --cache_size=1073741824 --use_existing_db --disable_auto_compactions
      ------------------------------------------------
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.498 micros/op 2006597 ops/sec;  222.0 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.295 micros/op 3393627 ops/sec;  375.4 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.285 micros/op 3511155 ops/sec;  388.4 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.286 micros/op 3500470 ops/sec;  387.2 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.283 micros/op 3530751 ops/sec;  390.6 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.289 micros/op 3464811 ops/sec;  383.3 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.277 micros/op 3612814 ops/sec;  399.7 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.283 micros/op 3539640 ops/sec;  391.6 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.285 micros/op 3503766 ops/sec;  387.6 MB/s
      ```
      
      After patch
      
      ```
      $ ./db_bench --benchmarks="readseq,readseq,readseq,readseq,readseq,readseq,readseq,readseq,readseq" --merge_operator="max" --merge_keys=100000 --num=100000 --db="/dev/shm/100K_merge_compacted/" --cache_size=1073741824 --use_existing_db --disable_auto_compactions
      ------------------------------------------------
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.476 micros/op 2100119 ops/sec;  232.3 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.278 micros/op 3600887 ops/sec;  398.4 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.275 micros/op 3636698 ops/sec;  402.3 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.271 micros/op 3691661 ops/sec;  408.4 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.273 micros/op 3661534 ops/sec;  405.1 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.276 micros/op 3627106 ops/sec;  401.3 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.272 micros/op 3682635 ops/sec;  407.4 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.266 micros/op 3758331 ops/sec;  415.8 MB/s
      DB path: [/dev/shm/100K_merge_compacted/]
      readseq      :       0.266 micros/op 3761907 ops/sec;  416.2 MB/s
      ```
      
      Test Plan: make check -j64
      
      Reviewers: yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59583
      f5177c76