1. 18 3月, 2014 5 次提交
  2. 17 3月, 2014 1 次提交
  3. 16 3月, 2014 1 次提交
  4. 15 3月, 2014 9 次提交
    • L
      journal log_number correctly in MANIFEST · 453ec52c
      Lei Jin 提交于
      Summary:
      Here is what it can cause probelm:
      There is one memtable flush and one compaction. Both call LogAndApply(). If both edits are applied in the same batch with flush edit first and the compaction edit followed. LogAndApplyHelper() will assign compaction edit current VersionSet's log number(which should be smaller than the log number from flush edit). It cause log_numbers in MANIFEST to be not monotonic increasing, which violates the assume Recover() makes. What is more is after comitting to MANIFEST file, log_number_ in VersionSet is updated to the log_number from the last edit, which is the compaction one. It ends up not updating the log_number.
      
      Test Plan:
      make whitebox_crash_test
      got another assertion about iter->valid(), not sure if that is related
      to this.
      
      Reviewers: igor, haobo
      
      Reviewed By: igor
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16875
      453ec52c
    • C
      Breaking line · f234dfd8
      Caio SBA 提交于
      f234dfd8
    • C
      Make it compile on Debian/GCC 4.7 · b9c78d2d
      Caio SBA 提交于
      b9c78d2d
    • I
      Merge pull request #97 from agchou/patch-1 · 5948a663
      Igor Canadi 提交于
      Fix copyright year
      5948a663
    • I
      Missing includes · 2bad3cb0
      Igor Canadi 提交于
      2bad3cb0
    • I
      unterminated conditional directive · 56dce9bf
      Igor Canadi 提交于
      56dce9bf
    • I
      Fix another Mac OS warning · f74659ac
      Igor Canadi 提交于
      f74659ac
    • I
      Fix HashSkipList and HashLinkedList SIGSEGV · 3c75cc15
      Igor Canadi 提交于
      Summary:
      Original Summary:
      Yesterday, @ljin and I were debugging various db_stress issues. We suspected one of them happens when we concurrently call NewIterator without prefix_seek on HashSkipList. This test demonstrates it.
      
      Update:
      Arena is not thread-safe!! When creating a new full iterator, we *have* to create a new arena, otherwise we're doomed.
      
      Test Plan: SIGSEGV and assertion-throwing test now works!
      
      Reviewers: ljin, haobo, sdong
      
      Reviewed By: sdong
      
      CC: leveldb, ljin
      
      Differential Revision: https://reviews.facebook.net/D16857
      3c75cc15
    • I
      Fix warning on Mac OS · 6c72079d
      Igor Canadi 提交于
      6c72079d
  5. 14 3月, 2014 1 次提交
    • S
      Fix extra compaction tasks scheduled after D16767 in some cases · 5aa81f04
      sdong 提交于
      Summary:
      With D16767, there is a case compaction tasks are scheduled infinitely:
      (1) no flush thread is configured and more than 1 compaction threads
      (2) a flush is going on by one compaction hread
      (3) the state of SST files is in the state that versions_->current()->NeedsCompaction() will generate a false positive (return true actually there is no work to be done)
      In that case, a infinite loop will be formed.
      
      This patch would fix it.
      
      Test Plan: make all check
      
      Reviewers: haobo, igor, ljin
      
      Reviewed By: igor
      
      CC: dhruba, yhchiang, leveldb
      
      Differential Revision: https://reviews.facebook.net/D16863
      5aa81f04
  6. 13 3月, 2014 9 次提交
  7. 12 3月, 2014 7 次提交
    • S
      Fix bad merge of D16791 and D16767 · 839c8ecf
      sdong 提交于
      Summary: A bad Auto-Merge caused log buffer is flushed twice. Remove the unintended one.
      
      Test Plan: Should already be tested (the code looks the same as when I ran unit tests).
      
      Reviewers: haobo, igor
      
      Reviewed By: haobo
      
      CC: ljin, yhchiang, leveldb
      
      Differential Revision: https://reviews.facebook.net/D16821
      839c8ecf
    • L
      make assert based on FLAGS_prefix_size · 86ba3e24
      Lei Jin 提交于
      Summary: as title
      
      Test Plan: running python tools/db_crashtest.py
      
      Reviewers: igor
      
      Reviewed By: igor
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16803
      86ba3e24
    • 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
  8. 11 3月, 2014 7 次提交