提交 f9fb3e36 编写于 作者: S starlord

MS-256 - MS-256 - Add more cache config


Former-commit-id: 9c2aad6170f3d2801e7d1a94b35ff04cdfbd2118
上级 e7888afb
...@@ -32,7 +32,7 @@ public: ...@@ -32,7 +32,7 @@ public:
IndexLoadTaskPtr loader = std::static_pointer_cast<IndexLoadTask>(task); IndexLoadTaskPtr loader = std::static_pointer_cast<IndexLoadTask>(task);
if(index_files.find(loader->file_->id_) != index_files.end()){ if(index_files.find(loader->file_->id_) != index_files.end()){
ENGINE_LOG_INFO << "Append SearchContext to exist IndexLoaderContext"; ENGINE_LOG_DEBUG << "Append SearchContext to exist IndexLoaderContext";
index_files.erase(loader->file_->id_); index_files.erase(loader->file_->id_);
loader->search_contexts_.push_back(context); loader->search_contexts_.push_back(context);
} }
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
//index_files still contains some index files, create new loader //index_files still contains some index files, create new loader
for(auto& pair : index_files) { for(auto& pair : index_files) {
ENGINE_LOG_INFO << "Create new IndexLoaderContext for: " << pair.second->location_; ENGINE_LOG_DEBUG << "Create new IndexLoaderContext for: " << pair.second->location_;
IndexLoadTaskPtr new_loader = std::make_shared<IndexLoadTask>(); IndexLoadTaskPtr new_loader = std::make_shared<IndexLoadTask>();
new_loader->search_contexts_.push_back(context); new_loader->search_contexts_.push_back(context);
new_loader->file_ = pair.second; new_loader->file_ = pair.second;
......
...@@ -31,7 +31,7 @@ SearchContext::AddIndexFile(TableFileSchemaPtr& index_file) { ...@@ -31,7 +31,7 @@ SearchContext::AddIndexFile(TableFileSchemaPtr& index_file) {
return false; return false;
} }
SERVER_LOG_INFO << "SearchContext " << identity_ << " add index file: " << index_file->id_; SERVER_LOG_DEBUG << "SearchContext " << identity_ << " add index file: " << index_file->id_;
map_index_files_[index_file->id_] = index_file; map_index_files_[index_file->id_] = index_file;
return true; return true;
...@@ -42,7 +42,7 @@ SearchContext::IndexSearchDone(size_t index_id) { ...@@ -42,7 +42,7 @@ SearchContext::IndexSearchDone(size_t index_id) {
std::unique_lock <std::mutex> lock(mtx_); std::unique_lock <std::mutex> lock(mtx_);
map_index_files_.erase(index_id); map_index_files_.erase(index_id);
done_cond_.notify_all(); done_cond_.notify_all();
SERVER_LOG_INFO << "SearchContext " << identity_ << " finish index file: " << index_id; SERVER_LOG_DEBUG << "SearchContext " << identity_ << " finish index file: " << index_id;
} }
void void
......
...@@ -41,7 +41,7 @@ IndexLoadTask::IndexLoadTask() ...@@ -41,7 +41,7 @@ IndexLoadTask::IndexLoadTask()
} }
std::shared_ptr<IScheduleTask> IndexLoadTask::Execute() { std::shared_ptr<IScheduleTask> IndexLoadTask::Execute() {
ENGINE_LOG_INFO << "Loading index(" << file_->id_ << ") from location: " << file_->location_; ENGINE_LOG_DEBUG << "Loading index(" << file_->id_ << ") from location: " << file_->location_;
server::TimeRecorder rc("Load index"); server::TimeRecorder rc("Load index");
//step 1: load index //step 1: load index
...@@ -53,7 +53,7 @@ std::shared_ptr<IScheduleTask> IndexLoadTask::Execute() { ...@@ -53,7 +53,7 @@ std::shared_ptr<IScheduleTask> IndexLoadTask::Execute() {
rc.Record("load index file to memory"); rc.Record("load index file to memory");
size_t file_size = index_ptr->PhysicalSize(); size_t file_size = index_ptr->PhysicalSize();
LOG(DEBUG) << "Index file type " << file_->file_type_ << " Of Size: " ENGINE_LOG_DEBUG << "Index file type " << file_->file_type_ << " Of Size: "
<< file_size/(1024*1024) << " M"; << file_size/(1024*1024) << " M";
CollectFileMetrics(file_->file_type_, file_size); CollectFileMetrics(file_->file_type_, file_size);
......
...@@ -51,7 +51,7 @@ std::shared_ptr<IScheduleTask> SearchTask::Execute() { ...@@ -51,7 +51,7 @@ std::shared_ptr<IScheduleTask> SearchTask::Execute() {
return nullptr; return nullptr;
} }
SERVER_LOG_INFO << "Searching in index(" << index_id_<< ") with " SERVER_LOG_DEBUG << "Searching in index(" << index_id_<< ") with "
<< search_contexts_.size() << " tasks"; << search_contexts_.size() << " tasks";
server::TimeRecorder rc("DoSearch index(" + std::to_string(index_id_) + ")"); server::TimeRecorder rc("DoSearch index(" + std::to_string(index_id_) + ")");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册