|
|
@ -650,6 +650,8 @@ void DBImpl::NotifyOnCompactionCompleted( |
|
|
|
if (shutting_down_.load(std::memory_order_acquire)) { |
|
|
|
if (shutting_down_.load(std::memory_order_acquire)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Version* current = cfd->current(); |
|
|
|
|
|
|
|
current->Ref(); |
|
|
|
// release lock while notifying events
|
|
|
|
// release lock while notifying events
|
|
|
|
mutex_.Unlock(); |
|
|
|
mutex_.Unlock(); |
|
|
|
TEST_SYNC_POINT("DBImpl::NotifyOnCompactionCompleted::UnlockMutex"); |
|
|
|
TEST_SYNC_POINT("DBImpl::NotifyOnCompactionCompleted::UnlockMutex"); |
|
|
@ -672,7 +674,7 @@ void DBImpl::NotifyOnCompactionCompleted( |
|
|
|
info.input_files.push_back(fn); |
|
|
|
info.input_files.push_back(fn); |
|
|
|
if (info.table_properties.count(fn) == 0) { |
|
|
|
if (info.table_properties.count(fn) == 0) { |
|
|
|
std::shared_ptr<const TableProperties> tp; |
|
|
|
std::shared_ptr<const TableProperties> tp; |
|
|
|
auto s = cfd->current()->GetTableProperties(&tp, fmd, &fn); |
|
|
|
auto s = current->GetTableProperties(&tp, fmd, &fn); |
|
|
|
if (s.ok()) { |
|
|
|
if (s.ok()) { |
|
|
|
info.table_properties[fn] = tp; |
|
|
|
info.table_properties[fn] = tp; |
|
|
|
} |
|
|
|
} |
|
|
@ -689,6 +691,7 @@ void DBImpl::NotifyOnCompactionCompleted( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
mutex_.Lock(); |
|
|
|
mutex_.Lock(); |
|
|
|
|
|
|
|
current->Unref(); |
|
|
|
// no need to signal bg_cv_ as it will be signaled at the end of the
|
|
|
|
// no need to signal bg_cv_ as it will be signaled at the end of the
|
|
|
|
// flush process.
|
|
|
|
// flush process.
|
|
|
|
#endif // ROCKSDB_LITE
|
|
|
|
#endif // ROCKSDB_LITE
|
|
|
|