mirror of https://github.com/milvus-io/milvus.git
MS-622 Delete vectors should be failed if date range is invalid
Former-commit-id: bedb2fcb458f9f2cd94c02d3095044aff8630f6bpull/191/head
parent
a56d6042e6
commit
e4889de803
|
@ -11,6 +11,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
|||
- MS-587 - Count get wrong result after adding vectors and index built immediately
|
||||
- MS-599 - search wrong result when table created with metric_type: IP
|
||||
- MS-601 - Docker logs error caused by get CPUTemperature error
|
||||
- MS-622 - Delete vectors should be failed if date range is invalid
|
||||
|
||||
## Improvement
|
||||
- MS-552 - Add and change the easylogging library
|
||||
|
|
|
@ -111,12 +111,15 @@ CentOS 7:
|
|||
$ yum install clang
|
||||
Ubuntu 16.04:
|
||||
$ sudo apt-get install clang-tidy
|
||||
$ sudo su
|
||||
$ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
$ sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install clang-format-6.0
|
||||
$ apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
|
||||
$ apt-get update
|
||||
$ apt-get install clang-format-6.0
|
||||
Ubuntu 18.04:
|
||||
$ sudo apt-get install clang-tidy clang-format
|
||||
|
||||
$ rm cmake_build/CMakeCache.txt
|
||||
```
|
||||
```shell
|
||||
$ ./build.sh -l
|
||||
|
|
|
@ -42,6 +42,8 @@ static const char* DQL_TASK_GROUP = "dql";
|
|||
static const char* DDL_DML_TASK_GROUP = "ddl_dml";
|
||||
static const char* PING_TASK_GROUP = "ping";
|
||||
|
||||
constexpr int64_t DAY_SECONDS = 24 * 60 * 60;
|
||||
|
||||
using DB_META = milvus::engine::meta::Meta;
|
||||
using DB_DATE = milvus::engine::meta::DateT;
|
||||
|
||||
|
@ -78,8 +80,6 @@ IndexType(engine::EngineType type) {
|
|||
return map_type[type];
|
||||
}
|
||||
|
||||
constexpr int64_t DAY_SECONDS = 24 * 60 * 60;
|
||||
|
||||
Status
|
||||
ConvertTimeRangeToDBDates(const std::vector<::milvus::grpc::Range>& range_array, std::vector<DB_DATE>& dates) {
|
||||
dates.clear();
|
||||
|
@ -94,10 +94,10 @@ ConvertTimeRangeToDBDates(const std::vector<::milvus::grpc::Range>& range_array,
|
|||
return Status(SERVER_INVALID_TIME_RANGE, "Invalid time range: " + range.start_value());
|
||||
}
|
||||
|
||||
int64_t days = (tt_end > tt_start) ? (tt_end - tt_start) / DAY_SECONDS : (tt_start - tt_end) / DAY_SECONDS;
|
||||
if (days == 0) {
|
||||
int64_t days = (tt_end - tt_start) / DAY_SECONDS;
|
||||
if (days <= 0) {
|
||||
return Status(SERVER_INVALID_TIME_RANGE,
|
||||
"Invalid time range: " + range.start_value() + " to " + range.end_value());
|
||||
"Invalid time range: The start-date should be smaller than end-date!");
|
||||
}
|
||||
|
||||
// range: [start_day, end_day)
|
||||
|
|
Loading…
Reference in New Issue