1. 13 8月, 2014 4 次提交
  2. 12 8月, 2014 2 次提交
    • S
      Flush only one column family · 06a52bda
      Stanislau Hlebik 提交于
      Summary:
      Currently DBImpl::Flush() triggers flushes in all column families.
      Instead we need to trigger just the column family specified.
      
      Test Plan: make all check
      
      Reviewers: igor, ljin, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D20841
      06a52bda
    • M
      Changes to support unity build: · 93e6b5e9
      miguelportilla 提交于
      * Script for building the unity.cc file via Makefile
      * Unity executable Makefile target for testing builds
      * Source code changes to fix compilation of unity build
      93e6b5e9
  3. 09 8月, 2014 3 次提交
  4. 07 8月, 2014 4 次提交
  5. 05 8月, 2014 1 次提交
  6. 01 8月, 2014 1 次提交
    • I
      Never CompactRange to level 0 in level compaction · e4c36739
      Igor Canadi 提交于
      Summary: I was bit by this when developing SpatialDB. In case all files are at level 0, CompactRange() will output the compacted files to level 0. This is not ideal, since read amp. is much better at level 1 and higher.
      
      Test Plan: Compacted data in SpatialDB, read manifest using ldb, verified that files are now at level 1 instead of 0.
      
      Reviewers: sdong, ljin, yhchiang, dhruba
      
      Reviewed By: dhruba
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D20901
      e4c36739
  7. 31 7月, 2014 1 次提交
  8. 29 7月, 2014 5 次提交
    • S
      Add DB::GetIntProperty() to return integer properties to be returned as integers · f04356e6
      sdong 提交于
      Summary: We have quite some properties that are integers and we are adding more. Add a function to directly return them as an integer, instead of a string
      
      Test Plan: Add several unit test checks
      
      Reviewers: yhchiang, igor, dhruba, haobo, ljin
      
      Reviewed By: ljin
      
      Subscribers: yoshinorim, leveldb
      
      Differential Revision: https://reviews.facebook.net/D20637
      f04356e6
    • L
      InternalStats to take cfd on constructor · 7e8bb71d
      Lei Jin 提交于
      Summary:
      It has one-to-one relationship with CFD. Take a pointer to CFD on
      constructor to avoid passing cfd through member functions.
      
      Test Plan: make
      
      Reviewers: sdong, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D20565
      7e8bb71d
    • L
      Change StopWatch interface · 1bd3431f
      Lei Jin 提交于
      Summary: So that we can avoid calling NowSecs() in MakeRoomForWrite twice
      
      Test Plan: make all check
      
      Reviewers: yhchiang, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D20529
      1bd3431f
    • L
      make statistics forward-able · f6ca226c
      Lei Jin 提交于
      Summary:
      Make StatisticsImpl being able to forward stats to provided statistics
      implementation. The main purpose is to allow us to collect internal
      stats in the future even when user supplies custom statistics
      implementation. It avoids intrumenting 2 sets of stats collection code.
      One immediate use case is tuning advisor, which needs to collect some
      internal stats, users may not be interested.
      
      Test Plan:
      ran db_bench and see stats show up at the end of run
      Will run make all check since some tests rely on statistics
      
      Reviewers: yhchiang, sdong, igor
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D20145
      f6ca226c
    • L
      make statistics forward-able · 40fa8a4c
      Lei Jin 提交于
      Summary:
      Make StatisticsImpl being able to forward stats to provided statistics
      implementation. The main purpose is to allow us to collect internal
      stats in the future even when user supplies custom statistics
      implementation. It avoids intrumenting 2 sets of stats collection code.
      One immediate use case is tuning advisor, which needs to collect some
      internal stats, users may not be interested.
      
      Test Plan:
      ran db_bench and see stats show up at the end of run
      Will run make all check since some tests rely on statistics
      
      Reviewers: yhchiang, sdong, igor
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D20145
      40fa8a4c
  9. 22 7月, 2014 2 次提交
    • S
      Allow user to specify DB path of output file of manual compaction · f6b7e1ed
      sdong 提交于
      Summary: Add a parameter path_id to DB::CompactRange(), to indicate where the output file should be placed to.
      
      Test Plan: add a unit test
      
      Reviewers: yhchiang, ljin
      
      Reviewed By: ljin
      
      Subscribers: xjin, igor, dhruba, MarkCallaghan, leveldb
      
      Differential Revision: https://reviews.facebook.net/D20085
      f6b7e1ed
    • L
      make internal stats independent of statistics · f6f1533c
      Lei Jin 提交于
      Summary:
      also make it aware of column family
      output from db_bench
      
      ```
      ** Compaction Stats [default] **
      Level Files Size(MB) Score Read(GB)  Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) RW-Amp W-Amp Rd(MB/s) Wr(MB/s)  Rn(cnt) Rnp1(cnt) Wnp1(cnt) Wnew(cnt)  Comp(sec) Comp(cnt) Avg(sec) Stall(sec) Stall(cnt) Avg(ms)
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        L0    14      956   0.9      0.0     0.0      0.0       2.7      2.7    0.0   0.0      0.0    111.6        0         0         0         0         24        40    0.612      75.20     492387    0.15
        L1    21     2001   2.0      5.7     2.0      3.7       5.3      1.6    5.4   2.6     71.2     65.7       31        43        55        12         82         2   41.242      43.72      41183    1.06
        L2   217    18974   1.9     16.5     2.0     14.4      15.1      0.7   15.6   7.4     70.1     64.3       17       182       185         3        241        16   15.052       0.00          0    0.00
        L3  1641   188245   1.8      9.1     1.1      8.0       8.5      0.5   15.4   7.4     61.3     57.2        9        75        76         1        152         9   16.887       0.00          0    0.00
        L4  4447   449025   0.4     13.4     4.8      8.6       9.1      0.5    4.7   1.9     77.8     52.7       38        79       100        21        176        38    4.639       0.00          0    0.00
       Sum  6340   659201   0.0     44.7    10.0     34.7      40.6      6.0   32.0  15.2     67.7     61.6       95       379       416        37        676       105    6.439     118.91     533570    0.22
       Int     0        0   0.0      1.2     0.4      0.8       1.3      0.5    5.2   2.7     59.1     65.6        3         7         9         2         20        10    2.003       0.00          0    0.00
      Stalls(secs): 75.197 level0_slowdown, 0.000 level0_numfiles, 0.000 memtable_compaction, 43.717 leveln_slowdown
      Stalls(count): 492387 level0_slowdown, 0 level0_numfiles, 0 memtable_compaction, 41183 leveln_slowdown
      
      ** DB Stats **
      Uptime(secs): 202.1 total, 13.5 interval
      Cumulative writes: 6291456 writes, 6291456 batches, 1.0 writes per batch, 4.90 ingest GB
      Cumulative WAL: 6291456 writes, 6291456 syncs, 1.00 writes per sync, 4.90 GB written
      Interval writes: 1048576 writes, 1048576 batches, 1.0 writes per batch, 836.0 ingest MB
      Interval WAL: 1048576 writes, 1048576 syncs, 1.00 writes per sync, 0.82 MB written
      
      Test Plan: ran it
      
      Reviewers: sdong, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19917
      f6f1533c
  10. 18 7月, 2014 1 次提交
  11. 17 7月, 2014 1 次提交
  12. 16 7月, 2014 1 次提交
  13. 15 7月, 2014 1 次提交
    • I
      Remove stats logger · 20c05630
      Igor Canadi 提交于
      Summary: Browsing through the code, looks like StatsLogger is not used at all!
      
      Test Plan: compiles
      
      Reviewers: ljin, sdong, yhchiang, dhruba
      
      Reviewed By: dhruba
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D19827
      20c05630
  14. 12 7月, 2014 2 次提交
    • L
      improve InternalStats output · 46f0f6dd
      Lei Jin 提交于
      Summary: as title
      
      Test Plan:
      sampe output:
      Level Files Size(MB) Score Read(GB)  Rn(GB) Rnp1(GB) Write(BG) Wnew(GB) RW-Amp W-Amp Rd(MB/s) Wr(MB/s)  Rn(cnt) Rnp1(cnt) Wnp1(cnt) Wnew(cnt)  Comp(sec) Comp(cnt) Avg(sec) Stall(sec) Stall(cnt) Avg(ms)
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        L0    15     1024   1.0      0.0     0.0      0.0       8.2      8.2    0.0   0.0      0.0    111.4        0         0         1         1         75       123    0.612     295.94    1939238    0.15
        L1    23     2118   2.1     20.9     8.3     12.7      20.0      7.3    5.0   2.4     73.2     69.9      124       141       208        67        293         8   36.582      17.05      16100    1.06
        L2   162    15333   1.5     47.0     7.1     40.0      42.6      2.6   12.7   6.0     67.9     61.5       62       457       482        25        709        55   12.898       0.00          0    0.00
        L3   985   108065   1.1     37.8     4.0     33.9      36.9      3.0   18.8   9.3     60.1     58.5       41       338       363        25        645        31   20.812       0.00          0    0.00
        L4  2788   356033   0.3      0.0     0.0      0.0       0.0      0.0    0.0   0.0      0.0      0.0        0         0         0         0          0         0    0.000       0.00          0    0.00
       Sum  3973   482572   0.0    105.8    19.3     86.5     107.7     21.2   11.1   5.6     62.9     64.0      227       936      1054       118       1723       217    7.938     312.99    1955338    0.16
      
      Reviewers: sdong, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19707
      46f0f6dd
    • F
      use FileLevel in LevelFileNumIterator · 178fd6f9
      Feng Zhu 提交于
      Summary:
        Use FileLevel in LevelFileNumIterator, thus use new version of findFile.
        Old version of findFile function is deleted.
        Write a function in version_set.cc to generate FileLevel from files_.
        Add GenerateFileLevelTest in version_set_test.cc
      
      Test Plan:
        make all check
      
      Reviewers: ljin, haobo, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: igor, dhruba
      
      Differential Revision: https://reviews.facebook.net/D19659
      178fd6f9
  15. 09 7月, 2014 1 次提交
    • L
      integrate rate limiter into rocksdb · 534357ca
      Lei Jin 提交于
      Summary:
      Add option and plugin rate limiter for PosixWritableFile. The rate
      limiter only applies to flush and compaction. WAL and MANIFEST are
      excluded from this enforcement.
      
      Test Plan: db_test
      
      Reviewers: igor, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19425
      534357ca
  16. 04 7月, 2014 3 次提交
    • Y
      Fixed a warning in release mode. · d33657a4
      Yueh-Hsuan Chiang 提交于
      Summary: Removed a variable that is only used in assertion check.
      
      Test Plan: make release
      
      Reviewers: ljin, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19455
      d33657a4
    • Y
      Finer report I/O stats about Flush and Compaction. · 90a6aca4
      Yueh-Hsuan Chiang 提交于
      Summary:
      This diff allows the I/O stats about Flush and Compaction to be reported
      in a more accurate way.  Instead of measuring the size of a file, it
      measure I/O cost in per read / write basis.
      
      Test Plan: make all check
      
      Reviewers: sdong, igor, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19383
      90a6aca4
    • Y
      Add timeout_hint_us to WriteOptions and introduce Status::TimeOut. · d4d338de
      Yueh-Hsuan Chiang 提交于
      Summary:
      This diff adds timeout_hint_us to WriteOptions.  If it's non-zero, then
      1) writes associated with this options MAY be aborted when it has been
        waiting for longer than the specified time.  If an abortion happens,
        associated writes will return Status::TimeOut.
      2) the stall time of the associated write caused by flush or compaction
        will be limited by timeout_hint_us.
      
      The default value of timeout_hint_us is 0 (i.e., OFF.)
      
      The statistics of timeout writes will be recorded in WRITE_TIMEDOUT.
      
      Test Plan:
      export ROCKSDB_TESTS=WriteTimeoutAndDelayTest
      make db_test
      ./db_test
      
      Reviewers: igor, ljin, haobo, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D18837
      d4d338de
  17. 03 7月, 2014 2 次提交
    • S
      Support Multiple DB paths (without having an interface to expose to users) · 2459f7ec
      sdong 提交于
      Summary:
      In this patch, we allow RocksDB to support multiple DB paths internally.
      No user interface is supported yet so this patch is silent to users.
      
      Test Plan: make all check
      
      Reviewers: igor, haobo, ljin, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D18921
      2459f7ec
    • I
      Centralize compression decision to compaction picker · f146cab2
      Igor Canadi 提交于
      Summary:
      Before this diff, we're deciding enable_compression in CompactionPicker and then we're deciding final compression type in DBImpl. This is kind of confusing.
      
      After the diff, the final compression type will be decided in CompactionPicker.
      
      The reason for this is that I want CompactFiles() to specify output compression type, so that people can mix and match compression styles in their compaction algorithms. This diff makes it much easier to do that.
      
      Test Plan: make check
      
      Reviewers: dhruba, haobo, sdong, yhchiang, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19137
      f146cab2
  18. 28 6月, 2014 1 次提交
  19. 27 6月, 2014 1 次提交
    • S
      Cache some conditions for DBImpl::MakeRoomForWrite · a3594867
      Stanislau Hlebik 提交于
      Summary:
      Task 4580155. Some conditions in DBImpl::MakeRoomForWrite can be cached in
      ColumnFamilyData, because theirs value can be changed only during compaction,
      adding new memtable and/or add recalculation of compaction score.
      
      These conditions are:
      
      cfd->imm()->size() ==  cfd->options()->max_write_buffer_number - 1
      cfd->current()->NumLevelFiles(0) >=  cfd->options()->level0_stop_writes_trigger
      cfd->options()->soft_rate_limit > 0.0 &&
          (score = cfd->current()->MaxCompactionScore()) >  cfd->options()->soft_rate_limit
      cfd->options()->hard_rate_limit > 1.0 &&
          (score = cfd->current()->MaxCompactionScore()) >  cfd->options()->hard_rate_limit
      
      P.S.
      As it's my first diff, Siying suggested to add everybody as a reviewers
      for this diff. Sorry, if I forgot someone or add someone by mistake.
      
      Test Plan: make all check
      
      Reviewers: haobo, xjin, dhruba, yhchiang, zagfox, ljin, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19311
      a3594867
  20. 20 6月, 2014 3 次提交
    • I
      Remove seek compaction · d4a84233
      Igor Canadi 提交于
      Summary:
      As discussed in our internal group, we don't get much use of seek compaction at the moment, while it's making code more complicated and slower in some cases.
      
      This diff removes seek compaction and (hopefully) all code that was introduced to support seek compaction.
      
      There is one test case that relied on didIO information. I'll try to find another way to implement it.
      
      Test Plan: make check
      
      Reviewers: sdong, haobo, yhchiang, ljin, dhruba
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19161
      d4a84233
    • Y
      Fixed a potential write hang · 4f5ccfd1
      Yueh-Hsuan Chiang 提交于
      Summary:
      Currently, when something badly happen in the DB::Write() while the write-queue
      contains more than one element, the current design seems to forget to clean up
      the queue as well as wake-up all the writers, this potentially makes rocksdb
      hang on writes.
      
      Test Plan: make all check
      
      Reviewers: sdong, ljin, igor, haobo
      
      Reviewed By: haobo
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19167
      4f5ccfd1
    • L
      bug fix: iteration over ColumnFamilySet needs to be under mutex · c4e90c79
      Lei Jin 提交于
      Summary: asan_crash_test is failing on segfault
      
      Test Plan: running asan_crash_test
      
      Reviewers: sdong, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19149
      c4e90c79