未验证 提交 e4264d84 编写于 作者: G groot 提交者: GitHub

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: Ngroot <yihua.mo@zilliz.com>

* Server is not forbidden to create new partition which tag is _default
Signed-off-by: Ngroot <yihua.mo@zilliz.com>
上级 310d5d70
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册