mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-25 14:31:35 +00:00
Expose column family id to OnCompactionCompleted (#4466)
Summary: The controller you requested could not be found. PTAL Pull Request resolved: https://github.com/facebook/rocksdb/pull/4466 Differential Revision: D10241358 Pulled By: yiwu-arbug fbshipit-source-id: 99664eb286860a6c8844d50efeb0ef6f0e10dd1e
This commit is contained in:
parent
7487a7628c
commit
e0f05754ba
|
@ -8,6 +8,7 @@
|
|||
* `OnTableFileCreated` will now be called for empty files generated during compaction. In that case, `TableFileCreationInfo::file_path` will be "(nil)" and `TableFileCreationInfo::file_size` will be zero.
|
||||
* Add `FlushOptions::allow_write_stall`, which controls whether Flush calls start working immediately, even if it causes user writes to stall, or will wait until flush can be performed without causing write stall (similar to `CompactRangeOptions::allow_write_stall`). Note that the default value is false, meaning we add delay to Flush calls until stalling can be avoided when possible. This is behavior change compared to previous RocksDB versions, where Flush calls didn't check if they might cause stall or not.
|
||||
* Application using PessimisticTransactionDB is expected to rollback/commit recovered transactions before starting new ones. This assumption is used to skip concurrency control during recovery.
|
||||
* Expose column family id to `OnCompactionCompleted`.
|
||||
|
||||
### New Features
|
||||
* TransactionOptions::skip_concurrency_control allows pessimistic transactions to skip the overhead of concurrency control. Could be used for optimizing certain transactions or during recovery.
|
||||
|
|
|
@ -762,6 +762,7 @@ void DBImpl::NotifyOnCompactionCompleted(
|
|||
TEST_SYNC_POINT("DBImpl::NotifyOnCompactionCompleted::UnlockMutex");
|
||||
{
|
||||
CompactionJobInfo info;
|
||||
info.cf_id = cfd->GetID();
|
||||
info.cf_name = cfd->GetName();
|
||||
info.status = st;
|
||||
info.thread_id = env_->GetThreadID();
|
||||
|
|
|
@ -177,6 +177,8 @@ struct CompactionJobInfo {
|
|||
explicit CompactionJobInfo(const CompactionJobStats& _stats) :
|
||||
stats(_stats) {}
|
||||
|
||||
// the id of the column family where the compaction happened.
|
||||
uint32_t cf_id;
|
||||
// the name of the column family where the compaction happened.
|
||||
std::string cf_name;
|
||||
// the status indicating whether the compaction was successful or not.
|
||||
|
|
Loading…
Reference in a new issue