Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 65364c2

Browse files
CPWstaticdutor
authored andcommitted
Report error if schema null. (vesoft-inc#1700)
Co-authored-by: dutor <[email protected]> (cherry picked from commit 8a9daec)
1 parent f274019 commit 65364c2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/graph/FetchVerticesExecutor.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,15 @@ void FetchVerticesExecutor::processAllPropsResult(RpcResponse &&result) {
343343
return;
344344
}
345345
auto schema = ectx()->schemaManager()->getTagSchema(spaceId_, tdata.tag_id, ver);
346+
if (schema == nullptr) {
347+
// It actually should never be null here.
348+
// But issue1699 indicates that it would be nullptr when schema
349+
// was altered. This is a hot fix through reporting error, and we will
350+
// find out why it is null.
351+
LOG(ERROR) << "Schema not found for id: " << tdata.tag_id;
352+
doError(Status::Error("Get schema failed when handle data."));
353+
return;
354+
}
346355
if (rsWriter == nullptr) {
347356
outputSchema = std::make_shared<SchemaWriter>();
348357
outputSchema->appendCol("VertexID", nebula::cpp2::SupportedType::VID);

0 commit comments

Comments
 (0)