mirror of https://github.com/milvus-io/milvus.git
Server is not forbidden to create new partition which tag is _default (#1770)
* HasTable with a not exist table name, return error status Signed-off-by: groot <yihua.mo@zilliz.com> * Server is not forbidden to create new partition which tag is _default Signed-off-by: groot <yihua.mo@zilliz.com>pull/1773/head
parent
310d5d70bc
commit
e4264d8461
|
@ -5,6 +5,7 @@ Please mark all change in change log and use the issue from GitHub
|
|||
# Milvus 0.8.0 (TBD)
|
||||
|
||||
## Bug
|
||||
- \#1762 Server is not forbidden to create new partition which tag is "_default"
|
||||
|
||||
## Feature
|
||||
|
||||
|
|
|
@ -47,6 +47,10 @@ CreatePartitionRequest::OnExecute() {
|
|||
return status;
|
||||
}
|
||||
|
||||
if (tag_ == milvus::engine::DEFAULT_PARTITON_TAG) {
|
||||
return Status(SERVER_INVALID_PARTITION_TAG, "'_default' is built-in partition tag");
|
||||
}
|
||||
|
||||
status = ValidationUtil::ValidatePartitionTags({tag_});
|
||||
fiu_do_on("CreatePartitionRequest.OnExecute.invalid_partition_name",
|
||||
status = Status(milvus::SERVER_UNEXPECTED_ERROR, ""));
|
||||
|
|
|
@ -422,7 +422,7 @@ ValidationUtil::ValidatePartitionTags(const std::vector<std::string>& partition_
|
|||
if (valid_tag.empty()) {
|
||||
std::string msg = "Invalid partition tag: " + valid_tag + ". " + "Partition tag should not be empty.";
|
||||
SERVER_LOG_ERROR << msg;
|
||||
return Status(SERVER_INVALID_TABLE_NAME, msg);
|
||||
return Status(SERVER_INVALID_PARTITION_TAG, msg);
|
||||
}
|
||||
|
||||
// max length of partition tag
|
||||
|
|
Loading…
Reference in New Issue