Skip to content

Commit

Permalink
Report error if schema null. (vesoft-inc#1700) (vesoft-inc#1711)
Browse files Browse the repository at this point in the history
Co-authored-by: dutor <440396+dutor@users.noreply.github.com>
(cherry picked from commit 8a9daec)
(cherry picked from commit 65364c2)

Co-authored-by: CPWstatic <13495049+CPWstatic@users.noreply.github.com>
  • Loading branch information
jude-zhu and CPWstatic authored Feb 3, 2020
1 parent eb6b4df commit 48569fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/graph/FetchVerticesExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,15 @@ void FetchVerticesExecutor::processAllPropsResult(RpcResponse &&result) {
return;
}
auto schema = ectx()->schemaManager()->getTagSchema(spaceId_, tdata.tag_id, ver);
if (schema == nullptr) {
// It actually should never be null here.
// But issue1699 indicates that it would be nullptr when schema
// was altered. This is a hot fix through reporting error, and we will
// find out why it is null.
LOG(ERROR) << "Schema not found for id: " << tdata.tag_id;
doError(Status::Error("Get schema failed when handle data."));
return;
}
if (rsWriter == nullptr) {
outputSchema = std::make_shared<SchemaWriter>();
outputSchema->appendCol("VertexID", nebula::cpp2::SupportedType::VID);
Expand Down

0 comments on commit 48569fa

Please sign in to comment.