diff --git a/cpp/src/db/DBMetaImpl.cpp b/cpp/src/db/DBMetaImpl.cpp index d13899dca071ecc5233933607760965b6ec9b016..2f88250a42aa3a736ead79c14094f6947ef4efb9 100644 --- a/cpp/src/db/DBMetaImpl.cpp +++ b/cpp/src/db/DBMetaImpl.cpp @@ -388,6 +388,7 @@ Status DBMetaImpl::CreateTableFile(TableFileSchema &file_schema) { file_schema.created_on_ = utils::GetMicroSecTimeStamp(); file_schema.updated_time_ = file_schema.created_on_; file_schema.engine_type_ = table_schema.engine_type_; + ENGINE_LOG_DEBUG << "CreateTableFile EngineTypee: " << table_schema.engine_type_; GetTableFilePath(file_schema); auto id = ConnectorPtr->insert(file_schema); diff --git a/cpp/src/db/EngineFactory.cpp b/cpp/src/db/EngineFactory.cpp index 3389c0a07e694028991d385133f40b0925c7ab8b..f05e487f38d5a3b240e59421fae3a21dedfe1553 100644 --- a/cpp/src/db/EngineFactory.cpp +++ b/cpp/src/db/EngineFactory.cpp @@ -53,6 +53,7 @@ EngineFactory::Build(uint16_t dimension, return nullptr; } + ENGINE_LOG_DEBUG << "EngineFactory EngineTypee: " << int(type); ExecutionEnginePtr execution_engine_ptr = std::make_shared(dimension, location, type); diff --git a/cpp/src/db/ExecutionEngineImpl.cpp b/cpp/src/db/ExecutionEngineImpl.cpp index ead97dfe38c01b9528b4b0f21d797ec1185bd48d..5927d09399b236362c3c6b58092d4ca43df994eb 100644 --- a/cpp/src/db/ExecutionEngineImpl.cpp +++ b/cpp/src/db/ExecutionEngineImpl.cpp @@ -37,17 +37,14 @@ VecIndexPtr ExecutionEngineImpl::CreatetVecIndex(EngineType type) { std::shared_ptr index; switch (type) { case EngineType::FAISS_IDMAP: { - ENGINE_LOG_DEBUG << "Build Index: IDMAP"; index = GetVecIndexFactory(IndexType::FAISS_IDMAP); break; } case EngineType::FAISS_IVFFLAT_GPU: { - ENGINE_LOG_DEBUG << "Build Index: IVFMIX"; index = GetVecIndexFactory(IndexType::FAISS_IVFFLAT_MIX); break; } case EngineType::FAISS_IVFFLAT_CPU: { - ENGINE_LOG_DEBUG << "Build Index: IVFCPU"; index = GetVecIndexFactory(IndexType::FAISS_IVFFLAT_CPU); break; } @@ -137,6 +134,7 @@ ExecutionEngineImpl::BuildIndex(const std::string &location) { ENGINE_LOG_DEBUG << "Build index file: " << location << " from: " << location_; auto from_index = std::dynamic_pointer_cast(index_); + ENGINE_LOG_DEBUG << "BuildIndex EngineTypee: " << int(build_type); auto to_index = CreatetVecIndex(build_type); ENGINE_LOG_DEBUG << "Build Params: [gpu_id] " << gpu_num; to_index->BuildAll(Count(), diff --git a/cpp/src/server/RequestTask.cpp b/cpp/src/server/RequestTask.cpp index 51d5404107b07b03bc4f45ee78581deb839971ee..555be29042473d47622da79bd8fa00b7aa9584bd 100644 --- a/cpp/src/server/RequestTask.cpp +++ b/cpp/src/server/RequestTask.cpp @@ -155,6 +155,7 @@ ServerError CreateTableTask::OnExecute() { } res = ValidateTableIndexType(schema_.index_type); + SERVER_LOG_DEBUG << "Createtbale EngineTypee: " << schema_.index_type; if(res != SERVER_SUCCESS) { return res; } diff --git a/cpp/src/wrapper/knowhere/vec_impl.cpp b/cpp/src/wrapper/knowhere/vec_impl.cpp index d50bfe34da8da850ba37c61288d399ec3da41f8b..4ca48bfe12283eaae5b5443db988d0c823d063a7 100644 --- a/cpp/src/wrapper/knowhere/vec_impl.cpp +++ b/cpp/src/wrapper/knowhere/vec_impl.cpp @@ -10,6 +10,7 @@ #include "vec_impl.h" #include "data_transfer.h" +#include "wrapper_log.h" namespace zilliz { @@ -138,6 +139,8 @@ void IVFMixIndex::BuildAll(const long &nb, const Config &cfg, const long &nt, const float *xt) { + WRAPPER_LOG_DEBUG << "Get Into Build IVFMIX"; + dim = cfg["dim"].as(); auto dataset = GenDatasetWithIds(nb, dim, xb, ids); @@ -153,7 +156,7 @@ void IVFMixIndex::BuildAll(const long &nb, auto host_index = device_index->Copy_index_gpu_to_cpu(); index_ = host_index; } else { - // TODO(linxj): LOG ERROR + WRAPPER_LOG_ERROR << "Build IVFMIXIndex Failed"; } } diff --git a/cpp/src/wrapper/knowhere/wrapper_log.h b/cpp/src/wrapper/knowhere/wrapper_log.h new file mode 100644 index 0000000000000000000000000000000000000000..39ca78092bf2dfe4a2be085b76a626bb822e9c61 --- /dev/null +++ b/cpp/src/wrapper/knowhere/wrapper_log.h @@ -0,0 +1,28 @@ +//////////////////////////////////////////////////////////////////////////////// +// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +// Unauthorized copying of this file, via any medium is strictly prohibited. +// Proprietary and confidential. +//////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include + +namespace zilliz { +namespace milvus { +namespace engine { + +#define WRAPPER_DOMAIN_NAME "[WRAPPER] " +#define WRAPPER_ERROR_TEXT "WRAPPER Error:" + +#define WRAPPER_LOG_TRACE LOG(TRACE) << WRAPPER_DOMAIN_NAME +#define WRAPPER_LOG_DEBUG LOG(DEBUG) << WRAPPER_DOMAIN_NAME +#define WRAPPER_LOG_INFO LOG(INFO) << WRAPPER_DOMAIN_NAME +#define WRAPPER_LOG_WARNING LOG(WARNING) << WRAPPER_DOMAIN_NAME +#define WRAPPER_LOG_ERROR LOG(ERROR) << WRAPPER_DOMAIN_NAME +#define WRAPPER_LOG_FATAL LOG(FATAL) << WRAPPER_DOMAIN_NAME + +} +} +} +