1. 12 3月, 2014 5 次提交
    • S
      Fix data race against logging data structure because of LogBuffer · bd45633b
      sdong 提交于
      Summary:
      @igor pointed out that there is a potential data race because of the way we use the newly introduced LogBuffer. After "bg_compaction_scheduled_--" or "bg_flush_scheduled_--", they can both become 0. As soon as the lock is released after that, DBImpl's deconstructor can go ahead and deconstruct all the states inside DB, including the info_log object hold in a shared pointer of the options object it keeps. At that point it is not safe anymore to continue using the info logger to write the delayed logs.
      
      With the patch, lock is released temporarily for log buffer to be flushed before "bg_compaction_scheduled_--" or "bg_flush_scheduled_--". In order to make sure we don't miss any pending flush or compaction, a new flag bg_schedule_needed_ is added, which is set to be true if there is a pending flush or compaction but not scheduled because of the max thread limit. If the flag is set to be true, the scheduling function will be called before compaction or flush thread finishes.
      
      Thanks @igor for this finding!
      
      Test Plan: make all check
      
      Reviewers: haobo, igor
      
      Reviewed By: haobo
      
      CC: dhruba, ljin, yhchiang, igor, leveldb
      
      Differential Revision: https://reviews.facebook.net/D16767
      bd45633b
    • L
      fix db_stress test · 02dab3be
      Lei Jin 提交于
      Summary: Fix the db_stress test, let is run with HashSkipList for real
      
      Test Plan:
      python tools/db_crashtest.py
      python tools/db_crashtest2.py
      
      Reviewers: igor, haobo
      
      Reviewed By: igor
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16773
      02dab3be
    • S
      Temp Fix of LogBuffer flushing · 6c66bc08
      sdong 提交于
      Summary: To temp fix the log buffer flushing. Flush the buffer inside the lock. Clean the trunk before we find an eventual fix.
      
      Test Plan: make all check
      
      Reviewers: haobo, igor
      
      Reviewed By: igor
      
      CC: ljin, leveldb, yhchiang
      
      Differential Revision: https://reviews.facebook.net/D16791
      6c66bc08
    • I
      Add a comment after SignalAll() · cb980216
      Igor Canadi 提交于
      Summary: Having code after SignalAll has already caused 2 bugs. Let's make sure this doesn't happen again.
      
      Test Plan: no test
      
      Reviewers: sdong, dhruba, haobo
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16785
      cb980216
    • S
      Env to add a function to allow users to query waiting queue length · 01dcef11
      sdong 提交于
      Summary: Add a function to Env so that users can query the waiting queue length of each thread pool
      
      Test Plan: add a test in env_test
      
      Reviewers: haobo
      
      Reviewed By: haobo
      
      CC: dhruba, igor, yhchiang, ljin, nkg-, leveldb
      
      Differential Revision: https://reviews.facebook.net/D16755
      01dcef11
  2. 11 3月, 2014 10 次提交
  3. 08 3月, 2014 3 次提交
  4. 07 3月, 2014 5 次提交
  5. 06 3月, 2014 9 次提交
    • K
      Make sure GetUniqueID releated tests run on "regular" storage · abeee9f2
      Kai Liu 提交于
      Summary:
      With the use of tmpfs or ramfs, unit tests related to GetUniqueID()
      failed because of the failure from ioctl, which doesn't work with these
      fancy file systems at all.
      
      I fixed this issue and make sure all related tests run on the "regular"
      storage (disk or flash).
      
      Test Plan: TEST_TMPDIR=/dev/shm make check -j32
      
      Reviewers: igor, dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16593
      abeee9f2
    • S
      Buffer info logs when picking compactions and write them out after releasing the mutex · ecb1ffa2
      sdong 提交于
      Summary: Now while the background thread is picking compactions, it writes out multiple info_logs, especially for universal compaction, which introduces a chance of waiting log writing in mutex, which is bad. To remove this risk, write all those info logs to a buffer and flush it after releasing the mutex.
      
      Test Plan:
      make all check
      check the log lines while running some tests that trigger compactions.
      
      Reviewers: haobo, igor, dhruba
      
      Reviewed By: dhruba
      
      CC: i.am.jin.lei, dhruba, yhchiang, leveldb, nkg-
      
      Differential Revision: https://reviews.facebook.net/D16515
      ecb1ffa2
    • S
      Allow user to specify log level for info_log · 4405f3a0
      sdong 提交于
      Summary:
      Currently, there is no easy way for user to change log level of info log. Add a parameter in options to specify that.
      Also make the default level to INFO level. Removing the [INFO] tag if it is INFO level as I don't want to cause performance regression. (add [LOG] means another mem-copy and string formatting).
      
      Test Plan:
      make all check
      manual check the levels work as expected.
      
      Reviewers: dhruba, yhchiang
      
      Reviewed By: yhchiang
      
      CC: dhruba, igor, i.am.jin.lei, ljin, haobo, leveldb
      
      Differential Revision: https://reviews.facebook.net/D16563
      4405f3a0
    • I
      Merge pull request #47 from mlin/kCompactionStopStyleSimilarSize · 8ca30bd5
      Igor Canadi 提交于
      An initial implementation of kCompactionStopStyleSimilarSize for universal compaction
      8ca30bd5
    • L
      output perf_context in db_bench readrandom · 04298f8c
      Lei Jin 提交于
      Summary:
      Add helper function to print perf context data in db_bench if enabled.
      I didn't find any code that actually exports perf context data. Not sure
      if I missed anything
      
      Test Plan: ran db_bench
      
      Reviewers: haobo, sdong, igor
      
      Reviewed By: igor
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16575
      04298f8c
    • L
      fix db_bench to use HashSkipList for real · 64138b5d
      Lei Jin 提交于
      Summary:
      For HashSkipList case, DBImpl has sanity check to see if prefix_extractor in
      options is the same as the one in memtable factory. If not, it falls
      back to SkipList. As result, I was experimenting with SkipList
      performance. No wonder it is much worse than LinkedList
      
      Test Plan: ran benchmark
      
      Reviewers: haobo, sdong, igor
      
      Reviewed By: igor
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16569
      64138b5d
    • L
      config max_background_flushes in db_bench · 51560ba7
      Lei Jin 提交于
      Summary: as title
      
      Test Plan: make release
      
      Reviewers: haobo, sdong, igor
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16437
      51560ba7
    • I
      MergingIterator assertion · c0ccf436
      Igor Canadi 提交于
      Summary: I wrote a test that triggers assertion in MergingIterator. I have not touched that code ever, so I'm looking for somebody with good understanding of the MergingIterator code to fix this. The solution is probably a one-liner. Let me know if you're willing to take a look.
      
      Test Plan: This test fails with an assertion `use_heap_ == false`
      
      Reviewers: dhruba, haobo, sdong, kailiu
      
      Reviewed By: sdong
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16521
      c0ccf436
    • I
      CloseDB in BackupableDBTest to make valgrind happy · 2b5155fb
      Igor Canadi 提交于
      2b5155fb
  6. 05 3月, 2014 4 次提交
  7. 04 3月, 2014 4 次提交