From 6b81dd55df0d18ec4e81885affc734fd114916a5 Mon Sep 17 00:00:00 2001 From: "yudong.cai" Date: Sat, 7 Mar 2020 17:02:21 +0800 Subject: [PATCH] #1536 move Config.cpp to config directory Signed-off-by: yudong.cai --- core/src/cache/CpuCacheMgr.cpp | 2 +- core/src/cache/GpuCacheMgr.cpp | 2 +- core/src/{server => config}/Config.cpp | 2 +- core/src/{server => config}/Config.h | 0 core/src/config/handler/CacheConfigHandler.cpp | 3 +-- core/src/config/handler/ConfigHandler.h | 2 +- core/src/config/handler/GpuConfigHandler.h | 2 +- core/src/config/handler/GpuSearchConfigHandler.cpp | 4 ++-- core/src/db/Utils.cpp | 2 +- core/src/db/engine/ExecutionEngineImpl.cpp | 2 +- core/src/db/insert/MemManagerImpl.h | 2 +- core/src/db/wal/WalManager.cpp | 2 +- .../vector_index/helpers/FaissGpuResourceMgr.h | 2 +- core/src/metrics/Metrics.cpp | 2 +- core/src/metrics/prometheus/PrometheusMetrics.cpp | 2 +- core/src/scheduler/SchedInst.cpp | 2 +- core/src/scheduler/SchedInst.h | 1 - core/src/scheduler/action/PushTaskToNeighbour.cpp | 7 +++---- core/src/scheduler/optimizer/FaissFlatPass.cpp | 2 +- core/src/scheduler/optimizer/FaissIVFFlatPass.cpp | 2 +- core/src/scheduler/optimizer/FaissIVFPQPass.cpp | 2 +- core/src/scheduler/optimizer/FaissIVFSQ8HPass.cpp | 2 +- core/src/scheduler/optimizer/FaissIVFSQ8Pass.cpp | 2 +- core/src/server/DBWrapper.cpp | 2 +- core/src/server/Server.cpp | 2 +- core/src/server/delivery/request/CmdRequest.cpp | 1 + .../server/delivery/request/CreateIndexRequest.cpp | 2 +- .../server/delivery/request/SearchByIDRequest.cpp | 2 +- core/src/server/grpc_impl/GrpcRequestHandler.cpp | 1 - core/src/server/grpc_impl/GrpcServer.cpp | 13 +++---------- core/src/server/web_impl/WebServer.cpp | 7 ++----- .../server/web_impl/handler/WebRequestHandler.cpp | 2 +- core/src/storage/s3/S3ClientWrapper.cpp | 2 +- core/src/utils/CommonUtil.cpp | 2 +- core/src/wrapper/ConfAdapter.cpp | 4 ++-- core/src/wrapper/KnowhereResource.cpp | 2 +- core/src/wrapper/VecIndex.cpp | 4 ++-- core/unittest/CMakeLists.txt | 2 +- core/unittest/db/test_db.cpp | 2 +- core/unittest/metrics/test_metrics.cpp | 2 +- core/unittest/metrics/test_prometheus.cpp | 2 +- core/unittest/server/test_config.cpp | 2 +- core/unittest/server/test_rpc.cpp | 2 +- core/unittest/server/test_web.cpp | 2 +- core/unittest/storage/test_s3_client.cpp | 2 +- core/unittest/storage/utils.cpp | 2 +- core/unittest/wrapper/test_knowhere.cpp | 2 +- 47 files changed, 52 insertions(+), 65 deletions(-) rename core/src/{server => config}/Config.cpp (99%) rename core/src/{server => config}/Config.h (100%) diff --git a/core/src/cache/CpuCacheMgr.cpp b/core/src/cache/CpuCacheMgr.cpp index 1ddec0b639..0c8b0477b7 100644 --- a/core/src/cache/CpuCacheMgr.cpp +++ b/core/src/cache/CpuCacheMgr.cpp @@ -10,7 +10,7 @@ // or implied. See the License for the specific language governing permissions and limitations under the License. #include "cache/CpuCacheMgr.h" -#include "server/Config.h" +#include "config/Config.h" #include "utils/Log.h" #include diff --git a/core/src/cache/GpuCacheMgr.cpp b/core/src/cache/GpuCacheMgr.cpp index 903038e012..fc3e1269ab 100644 --- a/core/src/cache/GpuCacheMgr.cpp +++ b/core/src/cache/GpuCacheMgr.cpp @@ -10,7 +10,7 @@ // or implied. See the License for the specific language governing permissions and limitations under the License. #include "cache/GpuCacheMgr.h" -#include "server/Config.h" +#include "config/Config.h" #include "utils/Log.h" #include diff --git a/core/src/server/Config.cpp b/core/src/config/Config.cpp similarity index 99% rename from core/src/server/Config.cpp rename to core/src/config/Config.cpp index 855e8bd1f7..52ecd30507 100644 --- a/core/src/server/Config.cpp +++ b/core/src/config/Config.cpp @@ -25,8 +25,8 @@ #include #include +#include "config/Config.h" #include "config/YamlConfigMgr.h" -#include "server/Config.h" #include "server/DBWrapper.h" #include "thirdparty/nlohmann/json.hpp" #include "utils/CommonUtil.h" diff --git a/core/src/server/Config.h b/core/src/config/Config.h similarity index 100% rename from core/src/server/Config.h rename to core/src/config/Config.h diff --git a/core/src/config/handler/CacheConfigHandler.cpp b/core/src/config/handler/CacheConfigHandler.cpp index ddf3e0a95d..f691110c11 100644 --- a/core/src/config/handler/CacheConfigHandler.cpp +++ b/core/src/config/handler/CacheConfigHandler.cpp @@ -10,8 +10,7 @@ // or implied. See the License for the specific language governing permissions and limitations under the License. #include "config/handler/CacheConfigHandler.h" - -#include "server/Config.h" +#include "config/Config.h" namespace milvus { namespace server { diff --git a/core/src/config/handler/ConfigHandler.h b/core/src/config/handler/ConfigHandler.h index 84e6e91dec..418a57d044 100644 --- a/core/src/config/handler/ConfigHandler.h +++ b/core/src/config/handler/ConfigHandler.h @@ -13,7 +13,7 @@ #include -#include "server/Config.h" +#include "config/Config.h" #include "utils/Log.h" namespace milvus { diff --git a/core/src/config/handler/GpuConfigHandler.h b/core/src/config/handler/GpuConfigHandler.h index a8c9af6b83..1b93cb28fc 100644 --- a/core/src/config/handler/GpuConfigHandler.h +++ b/core/src/config/handler/GpuConfigHandler.h @@ -15,8 +15,8 @@ #include #include +#include "config/Config.h" #include "config/handler/ConfigHandler.h" -#include "server/Config.h" namespace milvus { namespace server { diff --git a/core/src/config/handler/GpuSearchConfigHandler.cpp b/core/src/config/handler/GpuSearchConfigHandler.cpp index 22b27c1e56..a1a18d2bba 100644 --- a/core/src/config/handler/GpuSearchConfigHandler.cpp +++ b/core/src/config/handler/GpuSearchConfigHandler.cpp @@ -9,12 +9,12 @@ // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing permissions and limitations under the License. #ifdef MILVUS_GPU_VERSION -#include "config/handler/GpuSearchConfigHandler.h" #include #include -#include "server/Config.h" +#include "config/Config.h" +#include "config/handler/GpuSearchConfigHandler.h" namespace milvus { namespace server { diff --git a/core/src/db/Utils.cpp b/core/src/db/Utils.cpp index 3fa69c083a..6c6141b174 100644 --- a/core/src/db/Utils.cpp +++ b/core/src/db/Utils.cpp @@ -18,7 +18,7 @@ #include #include -#include "server/Config.h" +#include "config/Config.h" #include "storage/s3/S3ClientWrapper.h" #include "utils/CommonUtil.h" #include "utils/Log.h" diff --git a/core/src/db/engine/ExecutionEngineImpl.cpp b/core/src/db/engine/ExecutionEngineImpl.cpp index 8bd16fdc34..8676f63c35 100644 --- a/core/src/db/engine/ExecutionEngineImpl.cpp +++ b/core/src/db/engine/ExecutionEngineImpl.cpp @@ -20,11 +20,11 @@ #include "cache/CpuCacheMgr.h" #include "cache/GpuCacheMgr.h" +#include "config/Config.h" #include "db/Utils.h" #include "knowhere/common/Config.h" #include "metrics/Metrics.h" #include "scheduler/Utils.h" -#include "server/Config.h" #include "utils/CommonUtil.h" #include "utils/Exception.h" #include "utils/Log.h" diff --git a/core/src/db/insert/MemManagerImpl.h b/core/src/db/insert/MemManagerImpl.h index 8db2c6639b..22a9267920 100644 --- a/core/src/db/insert/MemManagerImpl.h +++ b/core/src/db/insert/MemManagerImpl.h @@ -19,11 +19,11 @@ #include #include +#include "config/Config.h" #include "config/handler/CacheConfigHandler.h" #include "db/insert/MemManager.h" #include "db/insert/MemTable.h" #include "db/meta/Meta.h" -#include "server/Config.h" #include "utils/Status.h" namespace milvus { diff --git a/core/src/db/wal/WalManager.cpp b/core/src/db/wal/WalManager.cpp index 188c941baf..c3f6c75bc6 100644 --- a/core/src/db/wal/WalManager.cpp +++ b/core/src/db/wal/WalManager.cpp @@ -16,7 +16,7 @@ #include #include -#include "server/Config.h" +#include "config/Config.h" #include "utils/CommonUtil.h" #include "utils/Exception.h" #include "utils/Log.h" diff --git a/core/src/index/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h b/core/src/index/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h index 05a1cc905b..7911f2f315 100644 --- a/core/src/index/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h +++ b/core/src/index/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h @@ -18,7 +18,7 @@ #include -#include "src/utils/BlockingQueue.h" +#include "utils/BlockingQueue.h" namespace knowhere { diff --git a/core/src/metrics/Metrics.cpp b/core/src/metrics/Metrics.cpp index 5f5a4aa45b..df40b76b66 100644 --- a/core/src/metrics/Metrics.cpp +++ b/core/src/metrics/Metrics.cpp @@ -10,7 +10,7 @@ // or implied. See the License for the specific language governing permissions and limitations under the License. #include "metrics/Metrics.h" -#include "server/Config.h" +#include "config/Config.h" #ifdef MILVUS_WITH_PROMETHEUS #include "metrics/prometheus/PrometheusMetrics.h" #endif diff --git a/core/src/metrics/prometheus/PrometheusMetrics.cpp b/core/src/metrics/prometheus/PrometheusMetrics.cpp index 6cd58894fc..bfdbcb90c4 100644 --- a/core/src/metrics/prometheus/PrometheusMetrics.cpp +++ b/core/src/metrics/prometheus/PrometheusMetrics.cpp @@ -11,8 +11,8 @@ #include "metrics/prometheus/PrometheusMetrics.h" #include "cache/GpuCacheMgr.h" +#include "config/Config.h" #include "metrics/SystemInfo.h" -#include "server/Config.h" #include "utils/Log.h" #include diff --git a/core/src/scheduler/SchedInst.cpp b/core/src/scheduler/SchedInst.cpp index 12b089ca9d..392e1abd97 100644 --- a/core/src/scheduler/SchedInst.cpp +++ b/core/src/scheduler/SchedInst.cpp @@ -12,7 +12,7 @@ #include "scheduler/SchedInst.h" #include "ResourceFactory.h" #include "Utils.h" -#include "server/Config.h" +#include "config/Config.h" #include #include diff --git a/core/src/scheduler/SchedInst.h b/core/src/scheduler/SchedInst.h index d116aba365..565a5a642d 100644 --- a/core/src/scheduler/SchedInst.h +++ b/core/src/scheduler/SchedInst.h @@ -24,7 +24,6 @@ #include "optimizer/FaissIVFSQ8Pass.h" #include "optimizer/FallbackPass.h" #include "optimizer/Optimizer.h" -#include "server/Config.h" #include #include diff --git a/core/src/scheduler/action/PushTaskToNeighbour.cpp b/core/src/scheduler/action/PushTaskToNeighbour.cpp index 8780b970da..86a8b5872a 100644 --- a/core/src/scheduler/action/PushTaskToNeighbour.cpp +++ b/core/src/scheduler/action/PushTaskToNeighbour.cpp @@ -11,11 +11,10 @@ #include #include -#include "../Algorithm.h" -#include "Action.h" +#include "cache/GpuCacheMgr.h" +#include "scheduler/Algorithm.h" +#include "scheduler/action/Action.h" #include "scheduler/tasklabel/SpecResLabel.h" -#include "src/cache/GpuCacheMgr.h" -#include "src/server/Config.h" namespace milvus { namespace scheduler { diff --git a/core/src/scheduler/optimizer/FaissFlatPass.cpp b/core/src/scheduler/optimizer/FaissFlatPass.cpp index 6130932b02..b6e75f7955 100644 --- a/core/src/scheduler/optimizer/FaissFlatPass.cpp +++ b/core/src/scheduler/optimizer/FaissFlatPass.cpp @@ -11,11 +11,11 @@ #ifdef MILVUS_GPU_VERSION #include "scheduler/optimizer/FaissFlatPass.h" #include "cache/GpuCacheMgr.h" +#include "config/Config.h" #include "scheduler/SchedInst.h" #include "scheduler/Utils.h" #include "scheduler/task/SearchTask.h" #include "scheduler/tasklabel/SpecResLabel.h" -#include "server/Config.h" #include "utils/Log.h" #include diff --git a/core/src/scheduler/optimizer/FaissIVFFlatPass.cpp b/core/src/scheduler/optimizer/FaissIVFFlatPass.cpp index 2e5be208cb..8d9f4ec577 100644 --- a/core/src/scheduler/optimizer/FaissIVFFlatPass.cpp +++ b/core/src/scheduler/optimizer/FaissIVFFlatPass.cpp @@ -11,11 +11,11 @@ #ifdef MILVUS_GPU_VERSION #include "scheduler/optimizer/FaissIVFFlatPass.h" #include "cache/GpuCacheMgr.h" +#include "config/Config.h" #include "scheduler/SchedInst.h" #include "scheduler/Utils.h" #include "scheduler/task/SearchTask.h" #include "scheduler/tasklabel/SpecResLabel.h" -#include "server/Config.h" #include "utils/Log.h" namespace milvus { diff --git a/core/src/scheduler/optimizer/FaissIVFPQPass.cpp b/core/src/scheduler/optimizer/FaissIVFPQPass.cpp index 1fc6ff9e6f..876d4fef32 100644 --- a/core/src/scheduler/optimizer/FaissIVFPQPass.cpp +++ b/core/src/scheduler/optimizer/FaissIVFPQPass.cpp @@ -11,11 +11,11 @@ #ifdef MILVUS_GPU_VERSION #include "scheduler/optimizer/FaissIVFPQPass.h" #include "cache/GpuCacheMgr.h" +#include "config/Config.h" #include "scheduler/SchedInst.h" #include "scheduler/Utils.h" #include "scheduler/task/SearchTask.h" #include "scheduler/tasklabel/SpecResLabel.h" -#include "server/Config.h" #include "utils/Log.h" #include diff --git a/core/src/scheduler/optimizer/FaissIVFSQ8HPass.cpp b/core/src/scheduler/optimizer/FaissIVFSQ8HPass.cpp index aa94651163..ec090efaad 100644 --- a/core/src/scheduler/optimizer/FaissIVFSQ8HPass.cpp +++ b/core/src/scheduler/optimizer/FaissIVFSQ8HPass.cpp @@ -11,11 +11,11 @@ #ifdef MILVUS_GPU_VERSION #include "scheduler/optimizer/FaissIVFSQ8HPass.h" #include "cache/GpuCacheMgr.h" +#include "config/Config.h" #include "scheduler/SchedInst.h" #include "scheduler/Utils.h" #include "scheduler/task/SearchTask.h" #include "scheduler/tasklabel/SpecResLabel.h" -#include "server/Config.h" #include "utils/Log.h" namespace milvus { diff --git a/core/src/scheduler/optimizer/FaissIVFSQ8Pass.cpp b/core/src/scheduler/optimizer/FaissIVFSQ8Pass.cpp index d35a97084a..339d21201f 100644 --- a/core/src/scheduler/optimizer/FaissIVFSQ8Pass.cpp +++ b/core/src/scheduler/optimizer/FaissIVFSQ8Pass.cpp @@ -11,11 +11,11 @@ #ifdef MILVUS_GPU_VERSION #include "scheduler/optimizer/FaissIVFSQ8Pass.h" #include "cache/GpuCacheMgr.h" +#include "config/Config.h" #include "scheduler/SchedInst.h" #include "scheduler/Utils.h" #include "scheduler/task/SearchTask.h" #include "scheduler/tasklabel/SpecResLabel.h" -#include "server/Config.h" #include "utils/Log.h" namespace milvus { diff --git a/core/src/server/DBWrapper.cpp b/core/src/server/DBWrapper.cpp index 798fb40807..8ba206172c 100644 --- a/core/src/server/DBWrapper.cpp +++ b/core/src/server/DBWrapper.cpp @@ -15,8 +15,8 @@ #include #include +#include "config/Config.h" #include "db/DBFactory.h" -#include "server/Config.h" #include "server/DBWrapper.h" #include "utils/CommonUtil.h" #include "utils/Log.h" diff --git a/core/src/server/Server.cpp b/core/src/server/Server.cpp index 63a5b51382..d90eadafa4 100644 --- a/core/src/server/Server.cpp +++ b/core/src/server/Server.cpp @@ -15,9 +15,9 @@ #include #include +#include "config/Config.h" #include "metrics/Metrics.h" #include "scheduler/SchedInst.h" -#include "server/Config.h" #include "server/DBWrapper.h" #include "server/grpc_impl/GrpcServer.h" #include "server/web_impl/WebServer.h" diff --git a/core/src/server/delivery/request/CmdRequest.cpp b/core/src/server/delivery/request/CmdRequest.cpp index 09e598c464..bd11b2f9a2 100644 --- a/core/src/server/delivery/request/CmdRequest.cpp +++ b/core/src/server/delivery/request/CmdRequest.cpp @@ -10,6 +10,7 @@ // or implied. See the License for the specific language governing permissions and limitations under the License. #include "server/delivery/request/CmdRequest.h" +#include "config/Config.h" #include "metrics/SystemInfo.h" #include "scheduler/SchedInst.h" #include "utils/Log.h" diff --git a/core/src/server/delivery/request/CreateIndexRequest.cpp b/core/src/server/delivery/request/CreateIndexRequest.cpp index 5836b3cc09..41edc05631 100644 --- a/core/src/server/delivery/request/CreateIndexRequest.cpp +++ b/core/src/server/delivery/request/CreateIndexRequest.cpp @@ -10,7 +10,7 @@ // or implied. See the License for the specific language governing permissions and limitations under the License. #include "server/delivery/request/CreateIndexRequest.h" -#include "server/Config.h" +#include "config/Config.h" #include "server/DBWrapper.h" #include "utils/Log.h" #include "utils/TimeRecorder.h" diff --git a/core/src/server/delivery/request/SearchByIDRequest.cpp b/core/src/server/delivery/request/SearchByIDRequest.cpp index c48fe973d8..5fce20fc48 100644 --- a/core/src/server/delivery/request/SearchByIDRequest.cpp +++ b/core/src/server/delivery/request/SearchByIDRequest.cpp @@ -19,7 +19,7 @@ #include -#include "server/Config.h" +#include "config/Config.h" #include "server/DBWrapper.h" #include "utils/CommonUtil.h" #include "utils/Log.h" diff --git a/core/src/server/grpc_impl/GrpcRequestHandler.cpp b/core/src/server/grpc_impl/GrpcRequestHandler.cpp index ed19171660..eaf0d47a3d 100644 --- a/core/src/server/grpc_impl/GrpcRequestHandler.cpp +++ b/core/src/server/grpc_impl/GrpcRequestHandler.cpp @@ -16,7 +16,6 @@ #include #include -#include "server/Config.h" #include "tracing/TextMapCarrier.h" #include "tracing/TracerUtil.h" #include "utils/Log.h" diff --git a/core/src/server/grpc_impl/GrpcServer.cpp b/core/src/server/grpc_impl/GrpcServer.cpp index 5a69644e51..de4549c4d6 100644 --- a/core/src/server/grpc_impl/GrpcServer.cpp +++ b/core/src/server/grpc_impl/GrpcServer.cpp @@ -31,8 +31,8 @@ #include #include "GrpcRequestHandler.h" +#include "config/Config.h" #include "grpc/gen-milvus/milvus.grpc.pb.h" -#include "server/Config.h" #include "server/DBWrapper.h" #include "server/grpc_impl/interceptor/SpanInterceptor.h" #include "utils/Log.h" @@ -75,16 +75,9 @@ Status GrpcServer::StartService() { Config& config = Config::GetInstance(); std::string address, port; - Status s; - s = config.GetServerConfigAddress(address); - if (!s.ok()) { - return s; - } - s = config.GetServerConfigPort(port); - if (!s.ok()) { - return s; - } + CONFIG_CHECK(config.GetServerConfigAddress(address)); + CONFIG_CHECK(config.GetServerConfigPort(port)); std::string server_address(address + ":" + port); diff --git a/core/src/server/web_impl/WebServer.cpp b/core/src/server/web_impl/WebServer.cpp index f8d440cf74..e029ca0031 100644 --- a/core/src/server/web_impl/WebServer.cpp +++ b/core/src/server/web_impl/WebServer.cpp @@ -10,14 +10,12 @@ // or implied. See the License for the specific language governing permissions and limitations under the License. #include - #include +#include "config/Config.h" #include "server/web_impl/WebServer.h" #include "server/web_impl/controller/WebController.hpp" -#include "server/Config.h" - namespace milvus { namespace server { namespace web { @@ -45,9 +43,8 @@ WebServer::StartService() { Config& config = Config::GetInstance(); std::string port; - Status status; - status = config.GetServerConfigWebPort(port); + CONFIG_CHECK(config.GetServerConfigWebPort(port)); { AppComponent components = AppComponent(std::stoi(port)); diff --git a/core/src/server/web_impl/handler/WebRequestHandler.cpp b/core/src/server/web_impl/handler/WebRequestHandler.cpp index f9bf7409db..e14ecdab21 100644 --- a/core/src/server/web_impl/handler/WebRequestHandler.cpp +++ b/core/src/server/web_impl/handler/WebRequestHandler.cpp @@ -17,8 +17,8 @@ #include #include +#include "config/Config.h" #include "metrics/SystemInfo.h" -#include "server/Config.h" #include "server/delivery/request/BaseRequest.h" #include "server/web_impl/Constants.h" #include "server/web_impl/Types.h" diff --git a/core/src/storage/s3/S3ClientWrapper.cpp b/core/src/storage/s3/S3ClientWrapper.cpp index e4b1fb61c1..3f4c0ba4ce 100644 --- a/core/src/storage/s3/S3ClientWrapper.cpp +++ b/core/src/storage/s3/S3ClientWrapper.cpp @@ -22,7 +22,7 @@ #include #include -#include "server/Config.h" +#include "config/Config.h" #include "storage/s3/S3ClientMock.h" #include "storage/s3/S3ClientWrapper.h" #include "utils/Error.h" diff --git a/core/src/utils/CommonUtil.cpp b/core/src/utils/CommonUtil.cpp index 3f53b64a32..1f353a3bba 100644 --- a/core/src/utils/CommonUtil.cpp +++ b/core/src/utils/CommonUtil.cpp @@ -12,7 +12,7 @@ #include "utils/CommonUtil.h" #include "cache/CpuCacheMgr.h" #include "cache/GpuCacheMgr.h" -#include "server/Config.h" +#include "config/Config.h" #include "utils/Log.h" #include diff --git a/core/src/wrapper/ConfAdapter.cpp b/core/src/wrapper/ConfAdapter.cpp index 7742f3bab7..07ba5c56dd 100644 --- a/core/src/wrapper/ConfAdapter.cpp +++ b/core/src/wrapper/ConfAdapter.cpp @@ -8,18 +8,18 @@ // Unless required by applicable law or agreed to in writing, software distributed under the License // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing permissions and limitations under the License. + #include "wrapper/ConfAdapter.h" #include - #include #include #include #include #include "WrapperException.h" +#include "config/Config.h" #include "knowhere/index/vector_index/helpers/IndexParameter.h" -#include "server/Config.h" #include "utils/Log.h" namespace milvus { diff --git a/core/src/wrapper/KnowhereResource.cpp b/core/src/wrapper/KnowhereResource.cpp index 7e046f34ab..734272abb3 100644 --- a/core/src/wrapper/KnowhereResource.cpp +++ b/core/src/wrapper/KnowhereResource.cpp @@ -14,9 +14,9 @@ #include "knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h" #endif +#include "config/Config.h" #include "faiss/FaissHook.h" #include "scheduler/Utils.h" -#include "server/Config.h" #include "utils/Log.h" #include diff --git a/core/src/wrapper/VecIndex.cpp b/core/src/wrapper/VecIndex.cpp index 9f5552c7a3..142b1e1d49 100644 --- a/core/src/wrapper/VecIndex.cpp +++ b/core/src/wrapper/VecIndex.cpp @@ -11,7 +11,7 @@ #include "wrapper/VecIndex.h" -#include "VecImpl.h" +#include "config/Config.h" #include "knowhere/common/Exception.h" #include "knowhere/index/vector_index/IndexBinaryIDMAP.h" #include "knowhere/index/vector_index/IndexBinaryIVF.h" @@ -22,7 +22,6 @@ #include "knowhere/index/vector_index/IndexIVFSQ.h" #include "knowhere/index/vector_index/IndexNSG.h" #include "knowhere/index/vector_index/IndexSPTAG.h" -#include "server/Config.h" #include "storage/file/FileIOReader.h" #include "storage/file/FileIOWriter.h" #include "storage/s3/S3IOReader.h" @@ -31,6 +30,7 @@ #include "utils/Log.h" #include "utils/TimeRecorder.h" #include "wrapper/BinVecImpl.h" +#include "wrapper/VecImpl.h" #ifdef MILVUS_GPU_VERSION #include diff --git a/core/unittest/CMakeLists.txt b/core/unittest/CMakeLists.txt index 95b63523d5..8d41b731fe 100644 --- a/core/unittest/CMakeLists.txt +++ b/core/unittest/CMakeLists.txt @@ -117,7 +117,7 @@ set(entry_file ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) set(helper_files - ${MILVUS_ENGINE_SRC}/server/Config.cpp + ${MILVUS_ENGINE_SRC}/config/Config.cpp ${MILVUS_ENGINE_SRC}/utils/CommonUtil.cpp ${MILVUS_ENGINE_SRC}/utils/TimeRecorder.cpp ${MILVUS_ENGINE_SRC}/utils/Status.cpp diff --git a/core/unittest/db/test_db.cpp b/core/unittest/db/test_db.cpp index 459fa24aed..74a8b1cfe2 100644 --- a/core/unittest/db/test_db.cpp +++ b/core/unittest/db/test_db.cpp @@ -18,6 +18,7 @@ #include #include "cache/CpuCacheMgr.h" +#include "config/Config.h" #include "db/Constants.h" #include "db/DB.h" #include "db/DBFactory.h" @@ -25,7 +26,6 @@ #include "db/IDGenerator.h" #include "db/meta/MetaConsts.h" #include "db/utils.h" -#include "server/Config.h" #include "utils/CommonUtil.h" namespace { diff --git a/core/unittest/metrics/test_metrics.cpp b/core/unittest/metrics/test_metrics.cpp index 5c21216fad..ed74aefddf 100644 --- a/core/unittest/metrics/test_metrics.cpp +++ b/core/unittest/metrics/test_metrics.cpp @@ -21,7 +21,7 @@ #define private public #include "cache/CpuCacheMgr.h" -#include "server/Config.h" +#include "config/Config.h" #include "metrics/utils.h" #include "db/DB.h" #include "db/meta/SqliteMetaImpl.h" diff --git a/core/unittest/metrics/test_prometheus.cpp b/core/unittest/metrics/test_prometheus.cpp index 292defb66b..d6f8078690 100644 --- a/core/unittest/metrics/test_prometheus.cpp +++ b/core/unittest/metrics/test_prometheus.cpp @@ -9,7 +9,7 @@ // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing permissions and limitations under the License. -#include "server/Config.h" +#include "config/Config.h" #include "metrics/prometheus/PrometheusMetrics.h" #include diff --git a/core/unittest/server/test_config.cpp b/core/unittest/server/test_config.cpp index c68dce1f0e..f60fd3dc62 100644 --- a/core/unittest/server/test_config.cpp +++ b/core/unittest/server/test_config.cpp @@ -17,8 +17,8 @@ #include #include +#include "config/Config.h" #include "config/YamlConfigMgr.h" -#include "server/Config.h" #include "server/utils.h" #include "utils/CommonUtil.h" #include "utils/StringHelpFunctions.h" diff --git a/core/unittest/server/test_rpc.cpp b/core/unittest/server/test_rpc.cpp index e1b5bafb3f..f12f0bad54 100644 --- a/core/unittest/server/test_rpc.cpp +++ b/core/unittest/server/test_rpc.cpp @@ -15,6 +15,7 @@ #include #include +#include "config/Config.h" #include "server/Server.h" #include "server/grpc_impl/GrpcRequestHandler.h" #include "server/delivery/RequestScheduler.h" @@ -26,7 +27,6 @@ #include "grpc/gen-status/status.pb.h" #include "scheduler/ResourceFactory.h" #include "scheduler/SchedInst.h" -#include "server/Config.h" #include "server/DBWrapper.h" #include "utils/CommonUtil.h" #include "server/grpc_impl/GrpcServer.h" diff --git a/core/unittest/server/test_web.cpp b/core/unittest/server/test_web.cpp index e5d6b70963..f1cdeb4a54 100644 --- a/core/unittest/server/test_web.cpp +++ b/core/unittest/server/test_web.cpp @@ -21,9 +21,9 @@ #include #include +#include "config/Config.h" #include "scheduler/ResourceFactory.h" #include "scheduler/SchedInst.h" -#include "server/Config.h" #include "server/DBWrapper.h" #include "server/delivery/RequestHandler.h" #include "server/delivery/RequestScheduler.h" diff --git a/core/unittest/storage/test_s3_client.cpp b/core/unittest/storage/test_s3_client.cpp index fab6d5e94b..1b326d57a7 100644 --- a/core/unittest/storage/test_s3_client.cpp +++ b/core/unittest/storage/test_s3_client.cpp @@ -16,8 +16,8 @@ #include #include +#include "config/Config.h" #include "easyloggingpp/easylogging++.h" -#include "server/Config.h" #include "storage/s3/S3ClientWrapper.h" #include "storage/s3/S3IOReader.h" #include "storage/s3/S3IOWriter.h" diff --git a/core/unittest/storage/utils.cpp b/core/unittest/storage/utils.cpp index 1e30ea7efa..fa1b4e6784 100644 --- a/core/unittest/storage/utils.cpp +++ b/core/unittest/storage/utils.cpp @@ -12,7 +12,7 @@ #include #include -#include "server/Config.h" +#include "config/Config.h" #include "storage/utils.h" #include "utils/CommonUtil.h" diff --git a/core/unittest/wrapper/test_knowhere.cpp b/core/unittest/wrapper/test_knowhere.cpp index bbbb51b94e..d27910f226 100644 --- a/core/unittest/wrapper/test_knowhere.cpp +++ b/core/unittest/wrapper/test_knowhere.cpp @@ -9,7 +9,7 @@ // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing permissions and limitations under the License. -#include "server/Config.h" +#include "config/Config.h" #include "wrapper/KnowhereResource.h" #include "wrapper/utils.h"