Commit 87db3d34 authored by groot's avatar groot
Browse files

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


Former-commit-id: 0ff35deb399444e08b26a376589f9c543c7a3cb9
parent e884fdb0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)

+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@

#include "scheduler/task/DeleteTask.h"

#include <utility>

namespace milvus {
namespace scheduler {

+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@

#include <memory>
#include <string>
#include <utility>

namespace milvus {
namespace scheduler {
+4 −5
Original line number Diff line number Diff line
@@ -18,11 +18,12 @@
#include "scheduler/task/TestTask.h"
#include "cache/GpuCacheMgr.h"

#include <utility>

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<std::mutex> lock(mutex_);
    cv_.wait(lock, [&] {
        return done_;
    });
    cv_.wait(lock, [&] { return done_; });
}

}  // namespace scheduler
+3 −3
Original line number Diff line number Diff line
@@ -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) {
Loading