diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e9840a63c..744a10014d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/core/src/db/Utils.cpp b/core/src/db/Utils.cpp index d37a6f83fc..4244b7a26e 100644 --- a/core/src/db/Utils.cpp +++ b/core/src/db/Utils.cpp @@ -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