From 8eb9d746c694154bc54cbaf17ed3f1582da01583 Mon Sep 17 00:00:00 2001 From: Doodle <13706157+critical27@users.noreply.github.com> Date: Wed, 28 Sep 2022 09:48:14 +0800 Subject: [PATCH] insert vertex key when only vertex and flag is set --- src/storage/mutate/AddVerticesProcessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/mutate/AddVerticesProcessor.cpp b/src/storage/mutate/AddVerticesProcessor.cpp index bd25e77ffc0..7900cd21220 100644 --- a/src/storage/mutate/AddVerticesProcessor.cpp +++ b/src/storage/mutate/AddVerticesProcessor.cpp @@ -82,7 +82,7 @@ void AddVerticesProcessor::doProcess(const cpp2::AddVerticesRequest& req) { code = nebula::cpp2::ErrorCode::E_INVALID_VID; break; } - if (onlyVertex || FLAGS_use_vertex_key) { + if (onlyVertex && FLAGS_use_vertex_key) { data.emplace_back(NebulaKeyUtils::vertexKey(spaceVidLen_, partId, vid), ""); } for (auto& newTag : newTags) { @@ -163,7 +163,7 @@ void AddVerticesProcessor::doProcessWithIndex(const cpp2::AddVerticesRequest& re code = nebula::cpp2::ErrorCode::E_INVALID_VID; break; } - if (onlyVertex || FLAGS_use_vertex_key) { + if (onlyVertex && FLAGS_use_vertex_key) { verticeData.emplace_back(NebulaKeyUtils::vertexKey(spaceVidLen_, partId, vid)); } for (const auto& newTag : newTags) {