1. 23 5月, 2015 7 次提交
  2. 22 5月, 2015 6 次提交
  3. 21 5月, 2015 1 次提交
  4. 20 5月, 2015 7 次提交
  5. 19 5月, 2015 6 次提交
    • I
      Add an option wal_bytes_per_sync to control sync_file_range for WAL files · 4a855c07
      Igor Canadi 提交于
      Summary:
      sync_file_range is not always asyncronous and thus can block writes if we do this for WAL in the foreground thread. See more here: http://yoshinorimatsunobu.blogspot.com/2014/03/how-syncfilerange-really-works.html
      
      Some users don't want us to call sync_file_range on WALs. Some other do.
      Thus, I'm adding a separate option wal_bytes_per_sync to control calling
      sync_file_range on WAL files. bytes_per_sync will apply only to table
      files now.
      
      Test Plan: no more sync_file_range for WAL as evidenced by strace
      
      Reviewers: yhchiang, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38253
      4a855c07
    • I
      Allow flushes to run in parallel with manual compaction · b0fdda4f
      Igor Canadi 提交于
      Summary: As title. I spent some time thinking about it and I don't think there should be any issue with running manual compaction and flushes in parallel
      
      Test Plan: make check works
      
      Reviewers: rven, yhchiang, sdong
      
      Reviewed By: yhchiang, sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38355
      b0fdda4f
    • Y
      Fixed compile errors due to some gcc does not have std::map::emplace · 74f3832d
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the following compile errors due to some gcc does not have std::map::emplace
      
      util/thread_status_impl.cc: In static member function ‘static std::map<std::basic_string<char>, long unsigned int> rocksdb::ThreadStatus::InterpretOperationProperties(rocksdb::ThreadStatus::OperationType, const uint64_t*)’:
      util/thread_status_impl.cc:88:20: error: ‘class std::map<std::basic_string<char>, long unsigned int>’ has no member named ‘emplace’
      util/thread_status_impl.cc:90:20: error: ‘class std::map<std::basic_string<char>, long unsigned int>’ has no member named ‘emplace’
      util/thread_status_impl.cc:94:20: error: ‘class std::map<std::basic_string<char>, long unsigned int>’ has no member named ‘emplace’
      util/thread_status_impl.cc:96:20: error: ‘class std::map<std::basic_string<char>, long unsigned int>’ has no member named ‘emplace’
      util/thread_status_impl.cc:98:20: error: ‘class std::map<std::basic_string<char>, long unsigned int>’ has no member named ‘emplace’
      util/thread_status_impl.cc:101:20: error: ‘class std::map<std::basic_string<char>, long unsigned int>’ has no member named ‘emplace’
      make: *** [util/thread_status_impl.o] Error 1
      
      Test Plan: make db_bench
      
      Reviewers: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38643
      74f3832d
    • S
      Remove duplicated code · 0c8017db
      stash93 提交于
      Summary: Call Flush() function instead
      
      Test Plan: make all check
      
      Reviewers: igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D38583
      0c8017db
    • S
      DBTest.DynamicLevelMaxBytesCompactRange: make sure L0 is not empty before running compact range · fb5bdbf9
      sdong 提交于
      Summary: DBTest.DynamicLevelMaxBytesCompactRange needs to make sure L0 is not empty to properly cover the code paths we want to cover. However, current codes have a bug that might leave the condition not held. Improve the test to ensure it.
      
      Test Plan: Run the test in an environment that is used to fail. Also run it many times.
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D38631
      fb5bdbf9
    • S
      CompactRange skips levels 1 to base_level -1 for dynamic level base size · 6fa70851
      sdong 提交于
      Summary: CompactRange() now is much more expensive for dynamic level base size as it goes through all the levels. Skip those not used levels between level 0 an base level.
      
      Test Plan: Run all unit tests
      
      Reviewers: yhchiang, rven, anthony, kradhakrishnan, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D37125
      6fa70851
  6. 16 5月, 2015 4 次提交
    • Y
      Allow GetThreadList to report Flush properties. · 3f0867c0
      Yueh-Hsuan Chiang 提交于
      Summary:
      Allow GetThreadList to report Flush properties, which includes:
      * job id
      * number of bytes that has been written since flush started.
      * total size of input mem-tables
      
      Test Plan:
      ./db_bench --threads=30 --num=1000000 --benchmarks=fillrandom --thread_status_per_interval=100 --value_size=1000
      
      Sample output from db_bench which tracks same flush job
      
                ThreadID ThreadType       cfName            Operation   ElapsedTime                                         Stage        State OperationProperties
         140213879898240   High Pri      default                Flush       5789 us                    FlushJob::WriteLevel0Table              BytesMemtables 4112835 | BytesWritten 577104 | JobID 8 |
      
                ThreadID ThreadType       cfName            Operation   ElapsedTime                                         Stage        State OperationProperties
         140213879898240   High Pri      default                Flush     30.634 ms                    FlushJob::WriteLevel0Table              BytesMemtables 4112835 | BytesWritten 1734865 | JobID 8 |
      
      Reviewers: rven, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38505
      3f0867c0
    • Y
      Use a better way to initialize ThreadStatus::kNumOperationProperties. · a66f643e
      Yueh-Hsuan Chiang 提交于
      Summary: Use a better way to initialize ThreadStatus::kNumOperationProperties.
      
      Test Plan: make
      
      Reviewers: sdong, rven, anthony, krishnanm86, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38547
      a66f643e
    • I
      Take a chance on a random file when choosing compaction · 7413306d
      Igor Canadi 提交于
      Summary:
      When trying to compact entire database with SuggestCompactRange(), we'll first try the left-most files. This is pretty bad, because:
      1) the left part of LSM tree will be overly compacted, but right part will not be touched
      2) First compaction will pick up the left-most file. Second compaction will try to pick up next left-most, but this will not be possible, because there's a big chance that second's file range on N+1 level is already being compacted.
      
      I observe both of those problems when running Mongo+RocksDB and trying to compact the DB to clean up tombstones. I'm unable to clean them up :(
      
      This diff adds a bit of randomness into choosing a file. First, it chooses a file at random and tries to compact that one. This should solve both problems specified here.
      
      Test Plan: make check
      
      Reviewers: yhchiang, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38379
      7413306d
    • S
      Use version defined in Makefile in rocksdb_build_git_sha · 8c52788f
      sdong 提交于
      Summary: Now rocksdb_build_git_sha is determined from "git sha". It is hard if the release is not from the repository directly but from a source code copy. Change to use the versions given in Makefile.
      
      Test Plan: Run "make util/build_version.cc"
      
      Reviewers: kradhakrishnan, rven, meyering, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D38451
      8c52788f
  7. 15 5月, 2015 1 次提交
  8. 14 5月, 2015 3 次提交
  9. 13 5月, 2015 4 次提交
    • Y
      Fixed compile error in db/column_family.cc · df1f87a8
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed the following compile error in db/column_family.cc
          db/column_family.cc:633:33: error: ‘ASSERT_GT’ was not declared in this scope
          16:14:45    ASSERT_GT(listeners.size(), 0U);
      
      Test Plan: make db_test
      
      Reviewers: igor, sdong, rven
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38367
      df1f87a8
    • Y
      Fixed a bug in EventListener::OnCompactionCompleted(). · 14431e97
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fixed a bug in EventListener::OnCompactionCompleted() that returns
      incorrect list of input / output file names.
      
      Test Plan: Extend existing test in listener_test.cc
      
      Reviewers: sdong, rven, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38349
      14431e97
    • I
      Add more table properties to EventLogger · dbd95b75
      Igor Canadi 提交于
      Summary:
      Example output:
      
          {"time_micros": 1431463794310521, "job": 353, "event": "table_file_creation", "file_number": 387, "file_size": 86937, "table_info": {"data_size": "81801", "index_size": "9751", "filter_size": "0", "raw_key_size": "23448", "raw_average_key_size": "24.000000", "raw_value_size": "990571", "raw_average_value_size": "1013.890481", "num_data_blocks": "245", "num_entries": "977", "filter_policy_name": "", "kDeletedKeys": "0"}}
      
      Also fixed a bug where BuildTable() in recovery was passing Env::IOHigh argument into paranoid_checks_file parameter.
      
      Test Plan: make check + check out the output in the log
      
      Reviewers: sdong, rven, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38343
      dbd95b75
    • I
      Reset parent_index and base_index when picking files marked for compaction · b5881762
      Igor Canadi 提交于
      Summary: This caused a crash of our MongoDB + RocksDB instance. PickCompactionBySize() sets its own parent_index. We never reset this parent_index when picking PickFilesMarkedForCompactionExperimental(). So we might end up doing SetupOtherInputs() with parent_index that was set by PickCompactionBySize, although we're using compaction calculated using PickFilesMarkedForCompactionExperimental.
      
      Test Plan: Added a unit test that fails with assertion on master.
      
      Reviewers: yhchiang, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38337
      b5881762
  10. 12 5月, 2015 1 次提交
    • A
      API to fetch from both a WriteBatchWithIndex and the db · 711465cc
      agiardullo 提交于
      Summary:
      Added a couple functions to WriteBatchWithIndex to make it easier to query the value of a key including reading pending writes from a batch.  (This is needed for transactions).
      
      I created write_batch_with_index_internal.h to use to store an internal-only helper function since there wasn't a good place in the existing class hierarchy to store this function (and it didn't seem right to stick this function inside WriteBatchInternal::Rep).
      
      Since I needed to access the WriteBatchEntryComparator, I moved some helper classes from write_batch_with_index.cc into write_batch_with_index_internal.h/.cc.  WriteBatchIndexEntry, ReadableWriteBatch, and WriteBatchEntryComparator are all unchanged (just moved to a different file(s)).
      
      Test Plan: Added new unit tests.
      
      Reviewers: rven, yhchiang, sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38037
      711465cc