diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index a026353d0a78aa8311d10e91d6934171a6ee3cf7..19a7a5f7fd1b2fa47fcabb2ff1e078d55d149be0 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -38,6 +38,7 @@ Please mark all change in change log and use the ticket from JIRA. - MS-590 - Refine cmake code to support cpplint - MS-600 - Reconstruct unittest code - MS-602 - Remove zilliz namespace +- MS-610 - Change error code base value from hex to decimal # Milvus 0.4.0 (2019-09-12) diff --git a/cpp/src/scheduler/task/DeleteTask.cpp b/cpp/src/scheduler/task/DeleteTask.cpp index 7610657f54820c894da49d29fa66ea06d87d8452..bffe78cf8ff528df6a07c1f600710b634362ebf7 100644 --- a/cpp/src/scheduler/task/DeleteTask.cpp +++ b/cpp/src/scheduler/task/DeleteTask.cpp @@ -17,6 +17,8 @@ #include "scheduler/task/DeleteTask.h" +#include + namespace milvus { namespace scheduler { diff --git a/cpp/src/scheduler/task/Task.h b/cpp/src/scheduler/task/Task.h index 493adb419e6ed41eeabc5b9b229675809edfa393..53c2ab7fa1894db32f8e957641f1c5e3437c9fbf 100644 --- a/cpp/src/scheduler/task/Task.h +++ b/cpp/src/scheduler/task/Task.h @@ -24,6 +24,7 @@ #include #include +#include namespace milvus { namespace scheduler { diff --git a/cpp/src/scheduler/task/TestTask.cpp b/cpp/src/scheduler/task/TestTask.cpp index d670bae4bb74bcfd4db89dc76d03023d02b8b156..3ec3a8ab196fc2e4d09f362b8878e349367db54c 100644 --- a/cpp/src/scheduler/task/TestTask.cpp +++ b/cpp/src/scheduler/task/TestTask.cpp @@ -18,11 +18,12 @@ #include "scheduler/task/TestTask.h" #include "cache/GpuCacheMgr.h" +#include + namespace milvus { namespace scheduler { -TestTask::TestTask(TableFileSchemaPtr& file, TaskLabelPtr label) - : XSearchTask(file, std::move(label)) { +TestTask::TestTask(TableFileSchemaPtr& file, TaskLabelPtr label) : XSearchTask(file, std::move(label)) { } void @@ -43,9 +44,7 @@ TestTask::Execute() { void TestTask::Wait() { std::unique_lock lock(mutex_); - cv_.wait(lock, [&] { - return done_; - }); + cv_.wait(lock, [&] { return done_; }); } } // namespace scheduler diff --git a/cpp/src/utils/Error.h b/cpp/src/utils/Error.h index 81403947c85a54a7f54c14a680fe235b7520c5e2..9cba18ef41c22b30278f7378be78692cb55a7d62 100644 --- a/cpp/src/utils/Error.h +++ b/cpp/src/utils/Error.h @@ -26,7 +26,7 @@ namespace milvus { using ErrorCode = int32_t; constexpr ErrorCode SERVER_SUCCESS = 0; -constexpr ErrorCode SERVER_ERROR_CODE_BASE = 0x30000; +constexpr ErrorCode SERVER_ERROR_CODE_BASE = 30000; constexpr ErrorCode ToServerErrorCode(const ErrorCode error_code) { @@ -34,7 +34,7 @@ ToServerErrorCode(const ErrorCode error_code) { } constexpr ErrorCode DB_SUCCESS = 0; -constexpr ErrorCode DB_ERROR_CODE_BASE = 0x40000; +constexpr ErrorCode DB_ERROR_CODE_BASE = 40000; constexpr ErrorCode ToDbErrorCode(const ErrorCode error_code) { @@ -42,7 +42,7 @@ ToDbErrorCode(const ErrorCode error_code) { } constexpr ErrorCode KNOWHERE_SUCCESS = 0; -constexpr ErrorCode KNOWHERE_ERROR_CODE_BASE = 0x50000; +constexpr ErrorCode KNOWHERE_ERROR_CODE_BASE = 50000; constexpr ErrorCode ToKnowhereErrorCode(const ErrorCode error_code) { diff --git a/cpp/src/wrapper/ConfAdapterMgr.h b/cpp/src/wrapper/ConfAdapterMgr.h index e376d91070f51cd5c3cdb9d132292b6a846429d7..8d5fa22877a1d79fe33daec9dccad641503da423 100644 --- a/cpp/src/wrapper/ConfAdapterMgr.h +++ b/cpp/src/wrapper/ConfAdapterMgr.h @@ -20,9 +20,9 @@ #include "ConfAdapter.h" #include "VecIndex.h" +#include #include #include -#include namespace milvus { namespace engine {