1. 15 3月, 2014 1 次提交
  2. 14 3月, 2014 1 次提交
  3. 13 3月, 2014 1 次提交
    • I
      [CF] Code cleanup part 1 · fb2346fc
      Igor Canadi 提交于
      Summary:
      I'm cleaning up some code preparing for the big diff review tomorrow. This is the first part of the cleanup.
      
      Changes are mostly cosmetic. The goal is to decrease amount of code difference between columnfamilies and master branch.
      
      This diff also fixes race condition when dropping column family.
      
      Test Plan: Ran db_stress with variety of parameters
      
      Reviewers: dhruba, haobo
      
      Differential Revision: https://reviews.facebook.net/D16833
      fb2346fc
  4. 12 3月, 2014 1 次提交
    • I
      [CF] db_stress for column families · 457c78eb
      Igor Canadi 提交于
      Summary:
      I had this diff for a while to test column families implementation. Last night, I ran it sucessfully for 10 hours with the command:
      
         time ./db_stress --threads=30 --ops_per_thread=200000000 --max_key=5000 --column_families=20 --clear_column_family_one_in=3000000 --verify_before_write=1  --reopen=50 --max_background_compactions=10 --max_background_flushes=10 --db=/tmp/db_stress
      
      It is ready to be committed :)
      
      Test Plan: Ran it for 10 hours
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16797
      457c78eb
  5. 08 3月, 2014 1 次提交
  6. 06 3月, 2014 1 次提交
    • I
      [CF] Dont reuse dropped column family IDs · 9625acbf
      Igor Canadi 提交于
      Summary:
      Column family IDs should be unique, even if column family is dropped. To achieve this, we save max column family in manifest.
      
      Note that the diff is still not ready. I'm only using differential to move the patch to my Mac machine.
      
      Test Plan: added a test to column_family_test
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16581
      9625acbf
  7. 01 3月, 2014 1 次提交
    • I
      [CF] CreateColumnFamily fix · 510f84b6
      Igor Canadi 提交于
      Summary:
      This fixes few bugs with CreateColumnFamily
      * We first have to LogAndApply and then call VersionSet::CreateColumnFamily. Otherwise, WriteSnapshot might be invoked, writing out column family add inside of LogAndApply, even though it's not really committed
      * Fix LogAndApplyHelper() to not apply log number to column_family_data, which is in case of column family add, just a dummy (default) column family
      * Create SuperVerion when creating column family
      
      Test Plan: column_family_test
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16443
      510f84b6
  8. 28 2月, 2014 1 次提交
    • I
      [CF] WaitForFlush() instead of sleeping · 85b1b5e1
      Igor Canadi 提交于
      Summary: If we sleep for 300ms the test fails in valgrind because it takes more than 300ms to flush. This way we WaitForFlush() when we're expecting flush, but still sleep and check if the flush happens even though it's not supposed to.
      
      Test Plan: notest
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16401
      85b1b5e1
  9. 27 2月, 2014 6 次提交
    • I
      [CF] Test fixes and speedup · 4c422012
      Igor Canadi 提交于
      4c422012
    • I
      [CF] DifferentMergeOperators and DifferentCompactionStyles tests · 343c32be
      Igor Canadi 提交于
      Summary:
      Two new column family tests:
      * DifferentMergeOperators -- three column families, one without merge operator, one with add operator and one with append operator. verify that operations work as expected.
      * DifferentCompactionStyles -- three column families, two with level compactions and one with universal compaction. trigger the compactions and verify they work as expected.
      
      Test Plan: nope
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16377
      343c32be
    • I
      [CF] Make LogDeletionTest less flakey · 3c815464
      Igor Canadi 提交于
      Summary: Retry GetSortedWalFiles() and also wait 20ms before counting number of log files. WaitForFlush() doesn't necessarily wait for logs to be deleted, since logs are deleted outside of the mutex.
      
      Test Plan: column_family_test
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16371
      3c815464
    • I
      [CF] More tests · 6e7cae77
      Igor Canadi 提交于
      Summary: New unit tests for column families
      
      Test Plan: this is a test
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16359
      6e7cae77
    • I
      [CF] Fix lint errors in CF code · 9bce2b2a
      Igor Canadi 提交于
      Summary: Big CF diff uncovered some lint errors. This diff fixes some of them. Not much to see here
      
      Test Plan: make check
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16347
      9bce2b2a
    • I
      [CF] Handle failure in WriteBatch::Handler · 8b7ab995
      Igor Canadi 提交于
      Summary:
      * Add ColumnFamilyHandle::GetID() function. Client needs to know column family's ID to be able to construct WriteBatch
      * Handle WriteBatch::Handler failure gracefully. Since WriteBatch is not a very smart function (it takes raw CF id), client can add data to WriteBatch for column family that doesn't exist. In that case, we need to gracefully return failure status from DB::Write(). To do that, I added a return Status to WriteBatch functions PutCF, DeleteCF and MergeCF.
      
      Test Plan: Added test to column_family_test
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16323
      8b7ab995
  10. 26 2月, 2014 1 次提交
    • I
      [CF] Log deletion in column families · 5ad7ee03
      Igor Canadi 提交于
      Summary:
      * Added unit test that verifies that obsolete files are deleted.
      * Advance log number for empty column family when cutting log file.
      * MinLogNumber() bug fix! (caught by the new unit test)
      
      Test Plan: unit test
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16311
      5ad7ee03
  11. 15 2月, 2014 1 次提交
    • I
      [CF] DB test to run on non-default column family · c67d48c8
      Igor Canadi 提交于
      Summary:
      This is a huge diff and it was hectic, but the idea is actually quite simple. Every operation (Put, Get, etc.) done on default column family in DBTest is now forwarded to non-default ("pikachu"). The good news is that we had zero test failures! Column families look stable so far.
      
      One interesting test that I adapted for column families is MultiThreadedTest. I replaced every Put() with a WriteBatch writing to all column families concurrently. Every Put in the write batch contains unique_id. Instead of Get() I do a multiget across all column families with the same key. If atomicity holds, I expect to see the same unique_id in all column families.
      
      Test Plan: This is a test!
      
      Reviewers: dhruba, haobo, kailiu, sdong
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16149
      c67d48c8
  12. 13 2月, 2014 1 次提交
    • I
      [CF] Rethinking ColumnFamilyHandle and fix to dropping column families · b06840aa
      Igor Canadi 提交于
      Summary:
      The change to the public behavior:
      * When opening a DB or creating new column family client gets a ColumnFamilyHandle.
      * As long as column family handle is alive, client can do whatever he wants with it, even drop it
      * Dropped column family can still be read from (using the column family handle)
      * Added a new call CloseColumnFamily(). Client has to close all column families that he has opened before deleting the DB
      * As soon as column family is closed, any calls to DB using that column family handle will fail (also any outstanding calls)
      
      Internally:
      * Ref-counting ColumnFamilyData
      * New thread-safety for ColumnFamilySet
      * Dropped column families are now completely dropped and their memory cleaned-up
      
      Test Plan: added some tests to column_family_test
      
      Reviewers: dhruba, haobo, kailiu, sdong
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16101
      b06840aa
  13. 08 2月, 2014 1 次提交
  14. 01 2月, 2014 2 次提交
  15. 30 1月, 2014 2 次提交
    • I
      Fix column family test (create directory) · 15999e72
      Igor Canadi 提交于
      15999e72
    • I
      Read from and write to different column families · f24a3ee5
      Igor Canadi 提交于
      Summary: This one is big. It adds ability to write to and read from different column families (see the unit test). It also supports recovery of different column families from log, which was the hardest part to reason about. We need to make sure to never delete the log file which has unflushed data from any column family. To support that, I added another concept, which is versions_->MinLogNumber()
      
      Test Plan: Added a unit test in column_family_test
      
      Reviewers: dhruba, haobo, sdong, kailiu
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D15537
      f24a3ee5
  16. 24 1月, 2014 1 次提交
    • I
      ColumnFamilySet · 7c5e583a
      Igor Canadi 提交于
      Summary:
      I created a separate class ColumnFamilySet to keep track of column families. Before we did this in VersionSet and I believe this approach is cleaner.
      
      Let me know if you have any comments. I will commit tomorrow.
      
      Test Plan: make check
      
      Reviewers: dhruba, haobo, kailiu, sdong
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D15357
      7c5e583a
  17. 08 1月, 2014 1 次提交
    • I
      [column families] Implement DB::OpenWithColumnFamilies() · 72918eff
      Igor Canadi 提交于
      Summary:
      In addition to implementing OpenWithColumnFamilies, this diff also includes some minor changes:
      * Changed all column family names from Slice() to std::string. The performance of column family name handling is not critical, and it's more convenient and cleaner to have names as std::strings
      * Implemented ColumnFamilyOptions(const Options&) and DBOptions(const Options&)
      * Added ColumnFamilyOptions to VersionSet::ColumnFamilyData. ColumnFamilyOptions are specified on OpenWithColumnFamilies() and CreateColumnFamily()
      
      I will keep the diff in the Phabricator for a day or two and will push to the branch then. Feel free to comment even after the diff has been pushed.
      
      Test Plan: Added a simple unit test
      
      Reviewers: dhruba, haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D15033
      72918eff
  18. 03 1月, 2014 1 次提交