mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-06 10:52:56 +08:00
* fix #2264 Signed-off-by: yhmo <yihua.mo@zilliz.com> * typo Signed-off-by: yhmo <yihua.mo@zilliz.com> * fix ut Signed-off-by: yhmo <yihua.mo@zilliz.com> * typo Signed-off-by: yhmo <yihua.mo@zilliz.com> * Remove unnecessary memcpy Signed-off-by: yhmo <yihua.mo@zilliz.com> * remove SearchByID from C++SDK Signed-off-by: yhmo <yihua.mo@zilliz.com> * #2338 Signed-off-by: yhmo <yihua.mo@zilliz.com>
This commit is contained in:
parent
d160b279fc
commit
b7f410e43f
@ -1731,7 +1731,7 @@ MySQLMetaImpl::FilesToMerge(const std::string& collection_id, FilesHolder& files
|
||||
} // Scoped Connection
|
||||
|
||||
Status ret;
|
||||
int64_t files_count = 0;
|
||||
SegmentsSchema files;
|
||||
for (auto& resRow : res) {
|
||||
SegmentSchema collection_file;
|
||||
collection_file.file_size_ = resRow["file_size"];
|
||||
@ -1759,12 +1759,15 @@ MySQLMetaImpl::FilesToMerge(const std::string& collection_id, FilesHolder& files
|
||||
continue;
|
||||
}
|
||||
|
||||
files_holder.MarkFile(collection_file);
|
||||
files_count++;
|
||||
files.emplace_back(collection_file);
|
||||
}
|
||||
|
||||
if (files_count > 0) {
|
||||
LOG_ENGINE_DEBUG_ << "Collect " << files_count << " to-merge files in collection " << collection_id;
|
||||
// no need to merge if files count less than 2
|
||||
if (files.size() > 1) {
|
||||
LOG_ENGINE_DEBUG_ << "Collect " << files.size() << " to-merge files in collection " << collection_id;
|
||||
for (auto& file : files) {
|
||||
files_holder.MarkFile(file);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
} catch (std::exception& e) {
|
||||
|
||||
@ -1148,7 +1148,7 @@ SqliteMetaImpl::FilesToMerge(const std::string& collection_id, FilesHolder& file
|
||||
}
|
||||
|
||||
Status result;
|
||||
int64_t files_count = 0;
|
||||
SegmentsSchema files;
|
||||
for (auto& file : selected) {
|
||||
SegmentSchema collection_file;
|
||||
collection_file.file_size_ = std::get<5>(file);
|
||||
@ -1174,12 +1174,15 @@ SqliteMetaImpl::FilesToMerge(const std::string& collection_id, FilesHolder& file
|
||||
result = status;
|
||||
}
|
||||
|
||||
files_holder.MarkFile(collection_file);
|
||||
files_count++;
|
||||
files.emplace_back(collection_file);
|
||||
}
|
||||
|
||||
if (files_count > 0) {
|
||||
LOG_ENGINE_DEBUG_ << "Collect " << files_count << " to-merge files in collection " << collection_id;
|
||||
// no need to merge if files count less than 2
|
||||
if (files.size() > 1) {
|
||||
LOG_ENGINE_DEBUG_ << "Collect " << files.size() << " to-merge files in collection " << collection_id;
|
||||
for (auto& file : files) {
|
||||
files_holder.MarkFile(file);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} catch (std::exception& e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user