提交 fe93299d 编写于 作者: X Xu Peng 提交者: xj.lin

fix(db): set new file rows to 0


Former-commit-id: a8690d08c1563f0c7ddd91d5709912a5aab49899
上级 a9ed75fc
......@@ -133,6 +133,7 @@ Status DBImpl::merge_files(const std::string& group_id, const meta::DateT& date,
} else {
group_file.file_type = meta::GroupFileSchema::RAW;
}
group_file.rows = index_size;
updated.push_back(group_file);
status = _pMeta->update_files(updated);
......@@ -188,6 +189,7 @@ Status DBImpl::build_index(const meta::GroupFileSchema& file) {
/* std::cout << "raw size=" << from_index->ntotal << " index size=" << index->ntotal << std::endl; */
write_index(index, group_file.location.c_str());
group_file.file_type = meta::GroupFileSchema::INDEX;
group_file.rows = file.dimension * index->ntotal;
auto to_remove = file;
to_remove.file_type = meta::GroupFileSchema::TO_DELETE;
......
......@@ -165,6 +165,7 @@ Status DBMetaImpl::add_group_file(GroupFileSchema& group_file) {
group_file.file_type = GroupFileSchema::NEW;
group_file.file_id = ss.str();
group_file.dimension = group_info.dimension;
group_file.rows = 0;
GetGroupFilePath(group_file);
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册