1. 19 3月, 2014 5 次提交
  2. 18 3月, 2014 11 次提交
    • I
      Optimize fallocation · f26cb0f0
      Igor Canadi 提交于
      Summary:
      Based on my recent findings (posted in our internal group), if we use fallocate without KEEP_SIZE flag, we get superior performance of fdatasync() in append-only workloads.
      
      This diff provides an option for user to not use KEEP_SIZE flag, thus optimizing his sync performance by up to 2x-3x.
      
      At one point we also just called posix_fallocate instead of fallocate, which isn't very fast: http://code.woboq.org/userspace/glibc/sysdeps/posix/posix_fallocate.c.html (tl;dr it manually writes out zero bytes to allocate storage). This diff also fixes that, by first calling fallocate and then posix_fallocate if fallocate is not supported.
      
      Test Plan: make check
      
      Reviewers: dhruba, sdong, haobo, ljin
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16761
      f26cb0f0
    • I
      Fix race condition in manifest roll · ae25742a
      Igor Canadi 提交于
      Summary:
      When the manifest is getting rolled the following happens:
      1) manifest_file_number_ is assigned to a new manifest number (even though the old one is still current)
      2) mutex is unlocked
      3) SetCurrentFile() creates temporary file manifest_file_number_.dbtmp
      4) SetCurrentFile() renames manifest_file_number_.dbtmp to CURRENT
      5) mutex is locked
      
      If FindObsoleteFiles happens between (3) and (4) it will:
      1) Delete manifest_file_number_.dbtmp (because it's not in pending_outputs_)
      2) Delete old manifest (because the manifest_file_number_ already points to a new one)
      
      I introduce the concept of prev_manifest_file_number_ that will avoid the race condition.
      
      However, we should discuss the future of MANIFEST file rolling. We found some race conditions with it last week and who knows how many more are there. Nobody is using it in production because we don't trust the implementation. Should we even support it?
      
      Test Plan: make check
      
      Reviewers: ljin, dhruba, haobo, sdong
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16929
      ae25742a
    • I
      Adjust memtable sizes in unit test · d63ae5cb
      Igor Canadi 提交于
      d63ae5cb
    • I
      Merge branch 'master' into columnfamilies · 64904b39
      Igor Canadi 提交于
      Conflicts:
      	utilities/backupable/backupable_db.cc
      64904b39
    • I
      Check starts_with(prefix) in MultiPrefixIterate · 5601bc46
      Igor Canadi 提交于
      Summary: We switched to prefix_seek method of seeking. This means that anytime we check Valid(), we also need to check starts_with(prefix)
      
      Test Plan: ran db_stress
      
      Reviewers: ljin
      
      Reviewed By: ljin
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16953
      5601bc46
    • I
      keep_log_files option in BackupableDB · 9caeff51
      Igor Canadi 提交于
      Summary:
      Added an option to BackupableDB implementation that allows users to persist in-memory databases. When the restore happens with keep_log_files = true, it will
      *) Not delete existing log files in wal_dir
      *) Move log files from archive directory to wal_dir, so that DB can replay them if necessary
      
      Test Plan: Added an unit test
      
      Reviewers: dhruba, ljin
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16941
      9caeff51
    • I
      Merge branch 'master' into columnfamilies · e0c12115
      Igor Canadi 提交于
      Conflicts:
      	db/version_set.cc
      	tools/db_stress.cc
      e0c12115
    • Y
      Correct the logic of MemTable::ShouldFlushNow(). · a5fafd4f
      Yueh-Hsuan Chiang 提交于
      Summary:
      Memtable will now be forced to flush if the one of the following
      conditions is met:
      1. Already allocated more than write_buffer_size + 60% arena block size.
         (the overflowing condition)
      2. Unable to safely allocate one more arena block without hitting the
         overflowing condition AND the unused allocated memory < 25% arena
         block size.
      
      Test Plan: make all check
      
      Reviewers: sdong, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16893
      a5fafd4f
    • I
      No prefix iterator in db_stress · 9b8a2b52
      Igor Canadi 提交于
      Summary: We're trying to deprecate prefix iterators, so no need to test them in db_stress
      
      Test Plan: ran it
      
      Reviewers: ljin
      
      Reviewed By: ljin
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16917
      9b8a2b52
    • S
      Fix a bug that Prev() can hang. · c61c9830
      sdong 提交于
      Summary: Prev() now can hang when there is a key with more than max_skipped number of appearance internally but all of them are newer than the sequence ID to seek. Add unit tests to confirm the bug and fix it.
      
      Test Plan: make all check
      
      Reviewers: igor, haobo
      
      Reviewed By: igor
      
      CC: ljin, yhchiang, leveldb
      
      Differential Revision: https://reviews.facebook.net/D16899
      c61c9830
    • I
      Don't care about signed/unsigned compare · f9d05302
      Igor Canadi 提交于
      Summary:
      We need to stop these:
      https://github.com/facebook/rocksdb/pull/99
      https://github.com/facebook/rocksdb/pull/83
      
      Test Plan: no
      
      Reviewers: dhruba, haobo, sdong, ljin, yhchiang
      
      Reviewed By: ljin
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16905
      f9d05302
  3. 17 3月, 2014 1 次提交
  4. 16 3月, 2014 1 次提交
  5. 15 3月, 2014 13 次提交
  6. 14 3月, 2014 4 次提交
  7. 13 3月, 2014 5 次提交