提交 496989bb 编写于 作者: X Xu Peng

refactor(db): add more debug log


Former-commit-id: 7c196e05c60567216938115e081438beeecb0f47
上级 d3cbc1cc
......@@ -243,8 +243,7 @@ Status DBImpl<EngineT>::merge_files(const std::string& group_id, const meta::Dat
auto file_schema = file;
file_schema.file_type = meta::GroupFileSchema::TO_DELETE;
updated.push_back(file_schema);
/* LOG(DEBUG) << "About to merge file " << file_schema.file_id << */
/* " of size=" << file_schema.rows; */
LOG(DEBUG) << "Merging file " << file_schema.file_id;
index_size = index.Size();
if (index_size >= _options.index_trigger_size) break;
......@@ -260,8 +259,8 @@ Status DBImpl<EngineT>::merge_files(const std::string& group_id, const meta::Dat
group_file.rows = index_size;
updated.push_back(group_file);
status = _pMeta->update_files(updated);
/* LOG(DEBUG) << "New merged file " << group_file.file_id << */
/* " of size=" << group_file.rows; */
LOG(DEBUG) << "New merged file " << group_file.file_id <<
" of size=" << index.PhysicalSize()/(1024*1024) << " M";
index.Cache();
......@@ -322,6 +321,10 @@ Status DBImpl<EngineT>::build_index(const meta::GroupFileSchema& file) {
meta::GroupFilesSchema update_files = {to_remove, group_file};
_pMeta->update_files(update_files);
LOG(DEBUG) << "New index file " << group_file.file_id << " of size "
<< index->PhysicalSize()/(1024*1024) << " M"
<< " from file " << to_remove.file_id;
index->Cache();
return Status::OK();
......
......@@ -59,6 +59,9 @@ Status MemVectors<EngineT>::serialize(std::string& group_id) {
auto status = pMeta_->update_group_file(schema_);
LOG(DEBUG) << "New " << ((schema_.file_type == meta::GroupFileSchema::RAW) ? "raw" : "to_index")
<< " file " << schema_.file_id << " of size " << pEE_->PhysicalSize() / (1024*1024) << " M";
pEE_->Cache();
return status;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册