Skip to content

Commit

Permalink
Clean log. (#3944)
Browse files Browse the repository at this point in the history
Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
  • Loading branch information
Shylock-Hg and Sophie-Xie authored Mar 15, 2022
1 parent 4fc5a0c commit e75be4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/graph/validator/MutateValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Status InsertVerticesValidator::check() {
auto *tagName = item->tagName();
auto tagStatus = qctx_->schemaMng()->toTagID(spaceId_, *tagName);
if (!tagStatus.ok()) {
LOG(ERROR) << "No schema found for " << *tagName;
LOG(ERROR) << "No schema found for " << *tagName << " : " << tagStatus.status();
return Status::SemanticError("No schema found for `%s'", tagName->c_str());
}

Expand Down Expand Up @@ -758,13 +758,13 @@ Status UpdateVertexValidator::validateImpl() {
auto idRet = SchemaUtil::toVertexID(sentence->getVid(), vidType_);
if (!idRet.ok()) {
LOG(ERROR) << idRet.status();
return idRet.status();
return std::move(idRet).status();
}
vId_ = std::move(idRet).value();
NG_RETURN_IF_ERROR(initProps());
auto ret = qctx_->schemaMng()->toTagID(spaceId_, name_);
if (!ret.ok()) {
LOG(ERROR) << "No schema found for " << name_;
LOG(ERROR) << "No schema found for " << name_ << " : " << ret.status();
return Status::SemanticError("No schema found for `%s'", name_.c_str());
}
tagId_ = ret.value();
Expand Down Expand Up @@ -806,7 +806,7 @@ Status UpdateEdgeValidator::validateImpl() {
NG_RETURN_IF_ERROR(initProps());
auto ret = qctx_->schemaMng()->toEdgeType(spaceId_, name_);
if (!ret.ok()) {
LOG(ERROR) << "No schema found for " << name_;
LOG(ERROR) << "No schema found for " << name_ << " : " << ret.status();
return Status::SemanticError("No schema found for `%s'", name_.c_str());
}
edgeType_ = ret.value();
Expand Down
2 changes: 1 addition & 1 deletion src/graph/validator/UseValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Status UseValidator::validateImpl() {
// secondly get from cache
auto spaceId = qctx_->schemaMng()->toGraphSpaceID(*spaceName_);
if (!spaceId.ok()) {
LOG(ERROR) << "Unknown space: " << *spaceName_;
LOG(ERROR) << "Unknown space: " << *spaceName_ << " : " << spaceId.status();
return spaceId.status();
}
auto spaceDesc = qctx_->getMetaClient()->getSpaceDesc(spaceId.value());
Expand Down

0 comments on commit e75be4e

Please sign in to comment.