提交 dc72f1dd 编写于 作者: J jinhai

Merge branch 'branch-0.5.0' into 'branch-0.5.0'

MS-610 Change error code base value from hex to decimal

See merge request megasearch/milvus!660

Former-commit-id: de9a27e7644bbb8416bad57ad87a86e41f98c36c
...@@ -39,6 +39,7 @@ Please mark all change in change log and use the ticket from JIRA. ...@@ -39,6 +39,7 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-590 - Refine cmake code to support cpplint - MS-590 - Refine cmake code to support cpplint
- MS-600 - Reconstruct unittest code - MS-600 - Reconstruct unittest code
- MS-602 - Remove zilliz namespace - MS-602 - Remove zilliz namespace
- MS-610 - Change error code base value from hex to decimal
# Milvus 0.4.0 (2019-09-12) # Milvus 0.4.0 (2019-09-12)
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include "scheduler/task/DeleteTask.h" #include "scheduler/task/DeleteTask.h"
#include <utility>
namespace milvus { namespace milvus {
namespace scheduler { namespace scheduler {
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <utility>
namespace milvus { namespace milvus {
namespace scheduler { namespace scheduler {
......
...@@ -18,11 +18,12 @@ ...@@ -18,11 +18,12 @@
#include "scheduler/task/TestTask.h" #include "scheduler/task/TestTask.h"
#include "cache/GpuCacheMgr.h" #include "cache/GpuCacheMgr.h"
#include <utility>
namespace milvus { namespace milvus {
namespace scheduler { namespace scheduler {
TestTask::TestTask(TableFileSchemaPtr& file, TaskLabelPtr label) TestTask::TestTask(TableFileSchemaPtr& file, TaskLabelPtr label) : XSearchTask(file, std::move(label)) {
: XSearchTask(file, std::move(label)) {
} }
void void
...@@ -43,9 +44,7 @@ TestTask::Execute() { ...@@ -43,9 +44,7 @@ TestTask::Execute() {
void void
TestTask::Wait() { TestTask::Wait() {
std::unique_lock<std::mutex> lock(mutex_); std::unique_lock<std::mutex> lock(mutex_);
cv_.wait(lock, [&] { cv_.wait(lock, [&] { return done_; });
return done_;
});
} }
} // namespace scheduler } // namespace scheduler
......
...@@ -26,7 +26,7 @@ namespace milvus { ...@@ -26,7 +26,7 @@ namespace milvus {
using ErrorCode = int32_t; using ErrorCode = int32_t;
constexpr ErrorCode SERVER_SUCCESS = 0; constexpr ErrorCode SERVER_SUCCESS = 0;
constexpr ErrorCode SERVER_ERROR_CODE_BASE = 0x30000; constexpr ErrorCode SERVER_ERROR_CODE_BASE = 30000;
constexpr ErrorCode constexpr ErrorCode
ToServerErrorCode(const ErrorCode error_code) { ToServerErrorCode(const ErrorCode error_code) {
...@@ -34,7 +34,7 @@ ToServerErrorCode(const ErrorCode error_code) { ...@@ -34,7 +34,7 @@ ToServerErrorCode(const ErrorCode error_code) {
} }
constexpr ErrorCode DB_SUCCESS = 0; constexpr ErrorCode DB_SUCCESS = 0;
constexpr ErrorCode DB_ERROR_CODE_BASE = 0x40000; constexpr ErrorCode DB_ERROR_CODE_BASE = 40000;
constexpr ErrorCode constexpr ErrorCode
ToDbErrorCode(const ErrorCode error_code) { ToDbErrorCode(const ErrorCode error_code) {
...@@ -42,7 +42,7 @@ ToDbErrorCode(const ErrorCode error_code) { ...@@ -42,7 +42,7 @@ ToDbErrorCode(const ErrorCode error_code) {
} }
constexpr ErrorCode KNOWHERE_SUCCESS = 0; constexpr ErrorCode KNOWHERE_SUCCESS = 0;
constexpr ErrorCode KNOWHERE_ERROR_CODE_BASE = 0x50000; constexpr ErrorCode KNOWHERE_ERROR_CODE_BASE = 50000;
constexpr ErrorCode constexpr ErrorCode
ToKnowhereErrorCode(const ErrorCode error_code) { ToKnowhereErrorCode(const ErrorCode error_code) {
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
#include "ConfAdapter.h" #include "ConfAdapter.h"
#include "VecIndex.h" #include "VecIndex.h"
#include <functional>
#include <map> #include <map>
#include <memory> #include <memory>
#include <functional>
namespace milvus { namespace milvus {
namespace engine { namespace engine {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册