提交 ae98a92f 编写于 作者: G groot 提交者: jinhai

merge before index

Signed-off-by: Ngroot <yihua.mo@zilliz.com>
上级 cab9e5c2
...@@ -1408,7 +1408,14 @@ DBImpl::CreateIndex(const std::shared_ptr<server::Context>& context, const std:: ...@@ -1408,7 +1408,14 @@ DBImpl::CreateIndex(const std::shared_ptr<server::Context>& context, const std::
// step 1: wait merge file thread finished to avoid duplicate data bug // step 1: wait merge file thread finished to avoid duplicate data bug
auto status = Flush(); auto status = Flush();
WaitMergeFileFinish(); // let merge file thread finish WaitMergeFileFinish(); // let merge file thread finish
std::set<std::string> merge_collection_ids;
// merge all files for this collection, including its partitions
std::set<std::string> merge_collection_ids = {collection_id};
std::vector<meta::CollectionSchema> partition_array;
status = meta_ptr_->ShowPartitions(collection_id, partition_array);
for (auto& schema : partition_array) {
merge_collection_ids.insert(schema.collection_id_);
}
StartMergeTask(merge_collection_ids, true); // start force-merge task StartMergeTask(merge_collection_ids, true); // start force-merge task
WaitMergeFileFinish(); // let force-merge file thread finish WaitMergeFileFinish(); // let force-merge file thread finish
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册