1. 08 7月, 2016 4 次提交
  2. 07 7月, 2016 4 次提交
  3. 06 7月, 2016 3 次提交
    • S
      Add options.write_buffer_manager: control total memtable size across DB instances · 32df9733
      sdong 提交于
      Summary: Add option write_buffer_manager to help users control total memory spent on memtables across multiple DB instances.
      
      Test Plan: Add a new unit test.
      
      Reviewers: yhchiang, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: adela, benj, sumeet, muthu, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D59925
      32df9733
    • A
      group multiple batch of flush into one manifest file (one call to LogAndApply) · 5aaef91d
      Aaron Gao 提交于
      Summary: Currently, if several flush outputs are committed together, we issue each manifest write per batch (1 batch = 1 flush = 1 sst file = 1+ continuous memtables). Each manifest write requires one fsync and one fsync to parent directory. In some cases, it becomes the bottleneck of write. We should batch them and write in one manifest write when possible.
      
      Test Plan:
      ` ./db_bench -benchmarks="fillseq" -max_write_buffer_number=16 -max_background_flushes=16 -disable_auto_compactions=true -min_write_buffer_number_to_merge=1 -write_buffer_size=65536 -level0_stop_writes_trigger=10000 -level0_slowdown_writes_trigger=10000`
      **Before**
      ```
      Initializing RocksDB Options from the specified file
      Initializing RocksDB Options from command-line flags
      RocksDB:    version 4.9
      Date:       Fri Jul  1 15:38:17 2016
      CPU:        32 * Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
      CPUCache:   20480 KB
      Keys:       16 bytes each
      Values:     100 bytes each (50 bytes after compression)
      Entries:    1000000
      Prefix:    0 bytes
      Keys per prefix:    0
      RawSize:    110.6 MB (estimated)
      FileSize:   62.9 MB (estimated)
      Write rate: 0 bytes/second
      Compression: Snappy
      Memtablerep: skip_list
      Perf Level: 1
      WARNING: Assertions are enabled; benchmarks unnecessarily slow
      ------------------------------------------------
      Initializing RocksDB Options from the specified file
      Initializing RocksDB Options from command-line flags
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      fillseq      :     166.277 micros/op 6014 ops/sec;    0.7 MB/s
      ```
      **After**
      ```
      Initializing RocksDB Options from the specified file
      Initializing RocksDB Options from command-line flags
      RocksDB:    version 4.9
      Date:       Fri Jul  1 15:35:05 2016
      CPU:        32 * Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
      CPUCache:   20480 KB
      Keys:       16 bytes each
      Values:     100 bytes each (50 bytes after compression)
      Entries:    1000000
      Prefix:    0 bytes
      Keys per prefix:    0
      RawSize:    110.6 MB (estimated)
      FileSize:   62.9 MB (estimated)
      Write rate: 0 bytes/second
      Compression: Snappy
      Memtablerep: skip_list
      Perf Level: 1
      WARNING: Assertions are enabled; benchmarks unnecessarily slow
      ------------------------------------------------
      Initializing RocksDB Options from the specified file
      Initializing RocksDB Options from command-line flags
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      fillseq      :      52.328 micros/op 19110 ops/sec;    2.1 MB/s
      ```
      
      Reviewers: andrewkr, IslamAbdelRahman, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: igor, andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D60075
      5aaef91d
    • O
      Fix a bug that accesses invalid address in iterator cleanup function · a45ee831
      omegaga 提交于
      Summary: Reported in T11889874. When registering the cleanup function we should copy the option so that we can still access it if ReadOptions is deleted.
      
      Test Plan: Add a unit test to reproduce this bug.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D60087
      a45ee831
  4. 05 7月, 2016 2 次提交
  5. 02 7月, 2016 3 次提交
  6. 01 7月, 2016 4 次提交
    • A
      fix rate limiter to avoid starvation · cb2476a0
      Aaron Gao 提交于
      Summary:
      The current implementation of rate limiter has the possibility to introduce resource starvation when change its limit.
      This diff aims to fix this problem by consuming request bytes partially.
      
      Test Plan:
      ```
      ./rate_limiter_test
      [==========] Running 4 tests from 1 test case.
      [----------] Global test environment set-up.
      [----------] 4 tests from RateLimiterTest
      [ RUN      ] RateLimiterTest.OverflowRate
      [       OK ] RateLimiterTest.OverflowRate (0 ms)
      [ RUN      ] RateLimiterTest.StartStop
      [       OK ] RateLimiterTest.StartStop (0 ms)
      [ RUN      ] RateLimiterTest.Rate
      request size [1 - 1023], limit 10 KB/sec, actual rate: 10.355712 KB/sec, elapsed 2.00 seconds
      request size [1 - 1023], limit 20 KB/sec, actual rate: 19.136564 KB/sec, elapsed 2.00 seconds
      request size [1 - 2047], limit 20 KB/sec, actual rate: 20.783976 KB/sec, elapsed 2.10 seconds
      request size [1 - 2047], limit 40 KB/sec, actual rate: 39.308144 KB/sec, elapsed 2.10 seconds
      request size [1 - 4095], limit 40 KB/sec, actual rate: 40.318349 KB/sec, elapsed 2.20 seconds
      request size [1 - 4095], limit 80 KB/sec, actual rate: 79.667396 KB/sec, elapsed 2.20 seconds
      request size [1 - 8191], limit 80 KB/sec, actual rate: 81.807158 KB/sec, elapsed 2.30 seconds
      request size [1 - 8191], limit 160 KB/sec, actual rate: 160.659761 KB/sec, elapsed 2.20 seconds
      request size [1 - 16383], limit 160 KB/sec, actual rate: 160.700990 KB/sec, elapsed 3.00 seconds
      request size [1 - 16383], limit 320 KB/sec, actual rate: 317.639481 KB/sec, elapsed 2.50 seconds
      [       OK ] RateLimiterTest.Rate (22618 ms)
      [ RUN      ] RateLimiterTest.LimitChangeTest
      [COMPLETE] request size 10 KB, new limit 20KB/sec, refill period 1000 ms
      [COMPLETE] request size 10 KB, new limit 5KB/sec, refill period 1000 ms
      [COMPLETE] request size 20 KB, new limit 40KB/sec, refill period 1000 ms
      [COMPLETE] request size 20 KB, new limit 10KB/sec, refill period 1000 ms
      [COMPLETE] request size 40 KB, new limit 80KB/sec, refill period 1000 ms
      [COMPLETE] request size 40 KB, new limit 20KB/sec, refill period 1000 ms
      [COMPLETE] request size 80 KB, new limit 160KB/sec, refill period 1000 ms
      [COMPLETE] request size 80 KB, new limit 40KB/sec, refill period 1000 ms
      [COMPLETE] request size 160 KB, new limit 320KB/sec, refill period 1000 ms
      [COMPLETE] request size 160 KB, new limit 80KB/sec, refill period 1000 ms
      [       OK ] RateLimiterTest.LimitChangeTest (5002 ms)
      [----------] 4 tests from RateLimiterTest (27620 ms total)
      
      [----------] Global test environment tear-down
      [==========] 4 tests from 1 test case ran. (27621 ms total)
      [  PASSED  ] 4 tests.
      ```
      
      Reviewers: sdong, IslamAbdelRahman, yiwu, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D60207
      cb2476a0
    • A
      Run env_basic_test on Env::Default · 6b716765
      Andrew Kryczka 提交于
      Summary:
      Previously we couldn't run env_basic_test on Env::Default (PosixEnv on
      our platforms) since GetChildren*() behavior was inconsistent with our other
      Envs. We can normalize the output of GetChildren*() such that these test cases
      work on PosixEnv too.
      
      Test Plan: ran env_basic_test
      
      Reviewers: wanning
      
      Reviewed By: wanning
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D59943
      6b716765
    • A
      Move env_basic_test cleanup to TearDown · 9eb0b539
      Andrew Kryczka 提交于
      Summary:
      move cleanup to TearDown and handle directories, so cleanup will happen
      even if a test fails in the middle.
      
      Test Plan: ./env_basic_test
      
      Reviewers: wanning
      
      Reviewed By: wanning
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D60243
      9eb0b539
    • I
      Re-enable linux on travis · 1fe3bf82
      Islam AbdelRahman 提交于
      Summary: Travis clang issue on linux is fixed now, re-enable linux on travis
      
      Test Plan: https://travis-ci.org/facebook/rocksdb/builds/141098948
      
      Reviewers: yiwu, sdong, yhchiang, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D60189
      1fe3bf82
  7. 30 6月, 2016 4 次提交
  8. 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
  9. 28 6月, 2016 2 次提交
  10. 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
  11. 24 6月, 2016 3 次提交
  12. 23 6月, 2016 3 次提交
  13. 22 6月, 2016 1 次提交
    • 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