#4492 while share file system servcie became abnormal, the milvus can not supply query service (#4506)

* modify changelog

Signed-off-by: yhmo <yihua.mo@zilliz.com>

* #4492 while share file system servcie became abnormal, the milvus can not supply query service

Signed-off-by: yhmo <yihua.mo@zilliz.com>

* typo

Signed-off-by: yhmo <yihua.mo@zilliz.com>
pull/4553/head
groot 2020-12-25 10:12:58 +08:00 committed by GitHub
parent 9ab4baacd5
commit 89bbe1ee4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 32 deletions

View File

@ -6,6 +6,7 @@ Please mark all change in change log and use the issue from GitHub
- \#4307 Specify partition to load for load_collection()
- \#4378 Multi-threads to call load_collection() and search() cause Milvus hang
- \#4484 Milvus only search default partition if search parameter 'partition_tags' contains '_default'
- \#4492 while share file system servcie became abnormal, the milvus can not supply query service
## Feature
- \#4504 Add a metric to display the number of files opened by Milvus

View File

@ -156,38 +156,8 @@ CreateCollectionFilePath(const DBMetaOptions& options, meta::SegmentSchema& tabl
Status
GetCollectionFilePath(const DBMetaOptions& options, meta::SegmentSchema& table_file) {
std::string parent_path = ConstructParentFolder(options.path_, table_file);
std::string file_path = parent_path + "/" + table_file.file_id_;
// bool s3_enable = false;
// server::Config& config = server::Config::GetInstance();
// config.GetStorageConfigS3Enable(s3_enable);
// fiu_do_on("GetCollectionFilePath.enable_s3", s3_enable = true);
// if (s3_enable) {
// /* need not check file existence */
// table_file.location_ = file_path;
// return Status::OK();
// }
if (boost::filesystem::exists(parent_path)) {
table_file.location_ = file_path;
return Status::OK();
}
for (auto& path : options.slave_paths_) {
parent_path = ConstructParentFolder(path, table_file);
file_path = parent_path + "/" + table_file.file_id_;
if (boost::filesystem::exists(parent_path)) {
table_file.location_ = file_path;
return Status::OK();
}
}
std::string msg = "Collection file doesn't exist: " + file_path;
if (table_file.file_size_ > 0) { // no need to pop error for empty file
LOG_ENGINE_ERROR_ << msg << " in path: " << options.path_ << " for collection: " << table_file.collection_id_;
}
return Status(DB_ERROR, msg);
table_file.location_ = parent_path + "/" + table_file.file_id_;
return Status::OK();
}
Status