From bdf531524b3ad849641575854f60d0d44d15a06b Mon Sep 17 00:00:00 2001 From: groot Date: Thu, 28 Nov 2019 17:56:04 +0800 Subject: [PATCH] #599 Build index log is incorrect --- CHANGELOG.md | 1 + core/src/db/meta/MySQLMetaImpl.cpp | 19 +++++++++---------- core/src/db/meta/SqliteMetaImpl.cpp | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d23d3bd2..fab5bf3bd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ Please mark all change in change log and use the ticket from JIRA. - \#545 - Avoid dead circle of build index thread when error occurs - \#552 - Server down during building index_type: IVF_PQ using GPU-edition - \#561 - Milvus server should report exception/error message or terminate on mysql metadata backend error +- \#599 - Build index log is incorrect ## Feature - \#12 - Pure CPU version for Milvus diff --git a/core/src/db/meta/MySQLMetaImpl.cpp b/core/src/db/meta/MySQLMetaImpl.cpp index 10aac72b1a..7b53e6361a 100644 --- a/core/src/db/meta/MySQLMetaImpl.cpp +++ b/core/src/db/meta/MySQLMetaImpl.cpp @@ -1615,32 +1615,31 @@ MySQLMetaImpl::FilesByType(const std::string& table_id, const std::vector& } } - std::string msg = "Get table files by type. "; + std::string msg = "Get table files by type."; for (int file_type : file_types) { switch (file_type) { case (int)TableFileSchema::RAW: - msg = msg + "raw files:" + std::to_string(raw_count); + msg = msg + " raw files:" + std::to_string(raw_count); break; case (int)TableFileSchema::NEW: - msg = msg + "new files:" + std::to_string(raw_count); + msg = msg + " new files:" + std::to_string(new_count); break; case (int)TableFileSchema::NEW_MERGE: - msg = msg + "new_merge files:" + std::to_string(raw_count); + msg = msg + " new_merge files:" + std::to_string(new_merge_count); break; case (int)TableFileSchema::NEW_INDEX: - msg = msg + "new_index files:" + std::to_string(raw_count); + msg = msg + " new_index files:" + std::to_string(new_index_count); break; case (int)TableFileSchema::TO_INDEX: - msg = msg + "to_index files:" + std::to_string(raw_count); + msg = msg + " to_index files:" + std::to_string(to_index_count); break; case (int)TableFileSchema::INDEX: - msg = msg + "index files:" + std::to_string(raw_count); + msg = msg + " index files:" + std::to_string(index_count); break; case (int)TableFileSchema::BACKUP: - msg = msg + "backup files:" + std::to_string(raw_count); - break; - default: + msg = msg + " backup files:" + std::to_string(backup_count); break; + default:break; } } ENGINE_LOG_DEBUG << msg; diff --git a/core/src/db/meta/SqliteMetaImpl.cpp b/core/src/db/meta/SqliteMetaImpl.cpp index 92c1d9cb8f..07f890d50a 100644 --- a/core/src/db/meta/SqliteMetaImpl.cpp +++ b/core/src/db/meta/SqliteMetaImpl.cpp @@ -1157,29 +1157,29 @@ SqliteMetaImpl::FilesByType(const std::string& table_id, table_files.emplace_back(file_schema); } - std::string msg = "Get table files by type. "; + std::string msg = "Get table files by type."; for (int file_type : file_types) { switch (file_type) { case (int)TableFileSchema::RAW: - msg = msg + "raw files:" + std::to_string(raw_count); + msg = msg + " raw files:" + std::to_string(raw_count); break; case (int)TableFileSchema::NEW: - msg = msg + "new files:" + std::to_string(raw_count); + msg = msg + " new files:" + std::to_string(new_count); break; case (int)TableFileSchema::NEW_MERGE: - msg = msg + "new_merge files:" + std::to_string(raw_count); + msg = msg + " new_merge files:" + std::to_string(new_merge_count); break; case (int)TableFileSchema::NEW_INDEX: - msg = msg + "new_index files:" + std::to_string(raw_count); + msg = msg + " new_index files:" + std::to_string(new_index_count); break; case (int)TableFileSchema::TO_INDEX: - msg = msg + "to_index files:" + std::to_string(raw_count); + msg = msg + " to_index files:" + std::to_string(to_index_count); break; case (int)TableFileSchema::INDEX: - msg = msg + "index files:" + std::to_string(raw_count); + msg = msg + " index files:" + std::to_string(index_count); break; case (int)TableFileSchema::BACKUP: - msg = msg + "backup files:" + std::to_string(raw_count); + msg = msg + " backup files:" + std::to_string(backup_count); break; default:break; }