From 494f48bba04681160e1b09d22bf78b3a24e5875f Mon Sep 17 00:00:00 2001 From: Mo Xuan <59680192+mo-avatar@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:48:29 +0800 Subject: [PATCH] fix possible graph coredump when metadata refresh during certain query invoke ScanEdgeProcessor::checkAndBuildContexts especially in asan binary (#5855) fix possible graph coredump when metadata refresh during certain query excution --- src/storage/query/ScanEdgeProcessor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/storage/query/ScanEdgeProcessor.cpp b/src/storage/query/ScanEdgeProcessor.cpp index a193ad7da7c..9f971597b3b 100644 --- a/src/storage/query/ScanEdgeProcessor.cpp +++ b/src/storage/query/ScanEdgeProcessor.cpp @@ -66,6 +66,10 @@ nebula::cpp2::ErrorCode ScanEdgeProcessor::checkAndBuildContexts(const cpp2::Sca std::vector returnProps = *req.return_columns_ref(); ret = handleEdgeProps(returnProps); + if (ret != nebula::cpp2::ErrorCode::SUCCEEDED) { + return ret; + } + buildEdgeColName(returnProps); ret = buildFilter(req, [](const cpp2::ScanEdgeRequest& r, bool onlyTag) -> const std::string* { UNUSED(onlyTag);