提交 8b757539 编写于 作者: S starlord

MS-266 Improve topk reduce time by using multi-threads


Former-commit-id: fb7b6588c31ca34b48e349a5b928bca2d21fbc20
上级 f986af86
...@@ -89,7 +89,7 @@ DBImpl::DBImpl(const Options& options) ...@@ -89,7 +89,7 @@ DBImpl::DBImpl(const Options& options)
meta_ptr_ = DBMetaImplFactory::Build(options.meta, options.mode); meta_ptr_ = DBMetaImplFactory::Build(options.meta, options.mode);
mem_mgr_ = MemManagerFactory::Build(meta_ptr_, options_); mem_mgr_ = MemManagerFactory::Build(meta_ptr_, options_);
if (options.mode != Options::MODE::READ_ONLY) { if (options.mode != Options::MODE::READ_ONLY) {
ENGINE_LOG_INFO << "StartTimerTasks"; ENGINE_LOG_TRACE << "StartTimerTasks";
StartTimerTasks(); StartTimerTasks();
} }
...@@ -297,7 +297,7 @@ void DBImpl::StartMetricTask() { ...@@ -297,7 +297,7 @@ void DBImpl::StartMetricTask() {
return; return;
} }
ENGINE_LOG_INFO << "Start metric task"; ENGINE_LOG_TRACE << "Start metric task";
server::Metrics::GetInstance().KeepingAliveCounterIncrement(METRIC_ACTION_INTERVAL); server::Metrics::GetInstance().KeepingAliveCounterIncrement(METRIC_ACTION_INTERVAL);
int64_t cache_usage = cache::CpuCacheMgr::GetInstance()->CacheUsage(); int64_t cache_usage = cache::CpuCacheMgr::GetInstance()->CacheUsage();
...@@ -312,7 +312,7 @@ void DBImpl::StartMetricTask() { ...@@ -312,7 +312,7 @@ void DBImpl::StartMetricTask() {
server::Metrics::GetInstance().GPUMemoryUsageGaugeSet(); server::Metrics::GetInstance().GPUMemoryUsageGaugeSet();
server::Metrics::GetInstance().OctetsSet(); server::Metrics::GetInstance().OctetsSet();
ENGINE_LOG_INFO << "Metric task finished"; ENGINE_LOG_TRACE << "Metric task finished";
} }
void DBImpl::StartCompactionTask() { void DBImpl::StartCompactionTask() {
...@@ -433,7 +433,7 @@ Status DBImpl::BackgroundMergeFiles(const std::string& table_id) { ...@@ -433,7 +433,7 @@ Status DBImpl::BackgroundMergeFiles(const std::string& table_id) {
} }
void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) { void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) {
ENGINE_LOG_INFO << " Background compaction thread start"; ENGINE_LOG_TRACE << " Background compaction thread start";
Status status; Status status;
for (auto& table_id : table_ids) { for (auto& table_id : table_ids) {
...@@ -452,7 +452,7 @@ void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) { ...@@ -452,7 +452,7 @@ void DBImpl::BackgroundCompaction(std::set<std::string> table_ids) {
} }
meta_ptr_->CleanUpFilesWithTTL(ttl); meta_ptr_->CleanUpFilesWithTTL(ttl);
ENGINE_LOG_INFO << " Background compaction thread exit"; ENGINE_LOG_TRACE << " Background compaction thread exit";
} }
void DBImpl::StartBuildIndexTask(bool force) { void DBImpl::StartBuildIndexTask(bool force) {
...@@ -581,7 +581,7 @@ Status DBImpl::BuildIndexByTable(const std::string& table_id) { ...@@ -581,7 +581,7 @@ Status DBImpl::BuildIndexByTable(const std::string& table_id) {
} }
void DBImpl::BackgroundBuildIndex() { void DBImpl::BackgroundBuildIndex() {
ENGINE_LOG_INFO << " Background build index thread start"; ENGINE_LOG_TRACE << " Background build index thread start";
std::unique_lock<std::mutex> lock(build_index_mutex_); std::unique_lock<std::mutex> lock(build_index_mutex_);
meta::TableFilesSchema to_index_files; meta::TableFilesSchema to_index_files;
...@@ -599,7 +599,7 @@ void DBImpl::BackgroundBuildIndex() { ...@@ -599,7 +599,7 @@ void DBImpl::BackgroundBuildIndex() {
} }
} }
ENGINE_LOG_INFO << " Background build index thread exit"; ENGINE_LOG_TRACE << " Background build index thread exit";
} }
Status DBImpl::DropAll() { Status DBImpl::DropAll() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册