1. 03 9月, 2014 2 次提交
    • F
      fix dropping column family bug · 8438a193
      Feng Zhu 提交于
      Summary: 1. db/db_impl.cc:2324 (DBImpl::BackgroundCompaction) should not raise bg_error_ when column family is dropped during compaction.
      
      Test Plan: 1. db_stress
      
      Reviewers: ljin, yhchiang, dhruba, igor, sdong
      
      Reviewed By: igor
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D22653
      8438a193
    • T
      Refactor PerfStepTimer to stop on destruct · 6614a484
      Torrie Fischer 提交于
      This eliminates the need to remember to call PERF_TIMER_STOP when a section has
      been timed. This allows more useful design with the perf timers and enables
      possible return value optimizations. Simplistic example:
      
      class Foo {
        public:
          Foo(int v) : m_v(v);
        private:
          int m_v;
      }
      
      Foo makeFrobbedFoo(int *errno)
      {
        *errno = 0;
        return Foo();
      }
      
      Foo bar(int *errno)
      {
        PERF_TIMER_GUARD(some_timer);
      
        return makeFrobbedFoo(errno);
      }
      
      int main(int argc, char[] argv)
      {
        Foo f;
        int errno;
      
        f = bar(&errno);
      
        if (errno)
          return -1;
        return 0;
      }
      
      After bar() is called, perf_context.some_timer would be incremented as if
      Stop(&perf_context.some_timer) was called at the end, and the compiler is still
      able to produce optimizations on the return value from makeFrobbedFoo() through
      to main().
      6614a484
  2. 02 9月, 2014 1 次提交
    • I
      Don't let flush preempt compaction in certain cases · 7dcadb1d
      Igor Canadi 提交于
      Summary:
      I have an application configured with 16 background threads. Write rates are high. L0->L1 compactions is very slow and it limits the concurrency of the system. While it's happening, other 15 threads are idle. However, when there is a need of a flush, that one thread busy with L0->L1 is doing flush, instead of any other 15 threads that are just sitting there.
      
      This diff prevents that. If there are threads that are idle, we don't let flush preempt compaction.
      
      Test Plan: Will run stress test
      
      Reviewers: ljin, sdong, yhchiang
      
      Reviewed By: sdong, yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D22299
      7dcadb1d
  3. 31 8月, 2014 1 次提交
  4. 30 8月, 2014 1 次提交
  5. 29 8月, 2014 2 次提交
    • I
      Don't let other compactions run when manual compaction runs · d977e555
      Igor Canadi 提交于
      Summary:
      Based on discussions from t4982833. This is just a short-term fix, I plan to revamp manual compaction process as part of t4982812.
      
      Also, I think we should schedule automatic compactions at the very end of manual compactions, not when we're done with one level. I made that change as part of this diff. Let me know if you disagree.
      
      Test Plan: make check for now
      
      Reviewers: sdong, tnovak, yhchiang, ljin
      
      Reviewed By: yhchiang
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D22401
      d977e555
    • I
      Fix ios compile · d5bd6c77
      Igor Canadi 提交于
      Summary: No __thread for ios.
      
      Test Plan: compile works for ios now
      
      Reviewers: ljin, dhruba
      
      Reviewed By: dhruba
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D22491
      d5bd6c77
  6. 27 8月, 2014 1 次提交
  7. 26 8月, 2014 2 次提交
  8. 21 8月, 2014 2 次提交
  9. 15 8月, 2014 1 次提交
    • S
      Support purging logs from separate log directory · 58b0f9d8
      sdong 提交于
      Summary:
      1. Support purging info logs from a separate paths from DB path. Refactor the codes of generating info log prefixes so that it can be called when generating new files and scanning log directory.
      2. Fix the bug of not scanning multiple DB paths (should only impact multiple DB paths)
      
      Test Plan:
      Add unit test for generating and parsing info log files
      Add end-to-end test in db_test
      
      Reviewers: yhchiang, ljin
      
      Reviewed By: ljin
      
      Subscribers: leveldb, igor, dhruba
      
      Differential Revision: https://reviews.facebook.net/D21801
      58b0f9d8
  10. 14 8月, 2014 1 次提交
    • F
      log db path info before open · 5e642403
      Feng Zhu 提交于
      Summary: 1. write db MANIFEST, CURRENT, IDENTITY, sst files, log files to log before open
      
      Test Plan: run db and check LOG file
      
      Reviewers: ljin, yhchiang, igor, dhruba, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D21459
      5e642403
  11. 13 8月, 2014 5 次提交
  12. 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
  13. 09 8月, 2014 3 次提交
  14. 07 8月, 2014 4 次提交
  15. 05 8月, 2014 1 次提交
  16. 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
  17. 31 7月, 2014 1 次提交
  18. 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
  19. 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
  20. 18 7月, 2014 1 次提交
  21. 17 7月, 2014 1 次提交