From 804ab73309f0a6351fd0fc49eca1694bf71afe3b Mon Sep 17 00:00:00 2001 From: Doodle <13706157+critical27@users.noreply.github.com> Date: Tue, 11 Oct 2022 17:24:21 +0800 Subject: [PATCH] Revert "fix bug (#4675)" This reverts commit cccc0148e753d24066b84b26f0c10baf5d873168. --- src/storage/admin/StatsTask.cpp | 13 ++----------- src/storage/mutate/AddVerticesProcessor.cpp | 7 +------ 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/storage/admin/StatsTask.cpp b/src/storage/admin/StatsTask.cpp index 38cf4564306..c0cf60789de 100644 --- a/src/storage/admin/StatsTask.cpp +++ b/src/storage/admin/StatsTask.cpp @@ -142,8 +142,6 @@ nebula::cpp2::ErrorCode StatsTask::genSubTask(GraphSpaceID spaceId, edgetypeEdges[edge.first] = 0; } - VertexID lastVertexId = ""; - // Only stats valid vertex data, no multi version // For example // Vid tagId @@ -168,15 +166,8 @@ nebula::cpp2::ErrorCode StatsTask::genSubTask(GraphSpaceID spaceId, tagIter->next(); continue; } - - if (vId == lastVertexId) { - tagsVertices[tagId] += 1; - } else { - tagsVertices[tagId] += 1; - spaceVertices++; - lastVertexId = vId; - } - + spaceVertices++; + tagsVertices[tagId] += 1; tagIter->next(); sleepIfScannedSomeRecord(++countToSleep); } diff --git a/src/storage/mutate/AddVerticesProcessor.cpp b/src/storage/mutate/AddVerticesProcessor.cpp index 0709062fb8e..354d5f1a6f3 100644 --- a/src/storage/mutate/AddVerticesProcessor.cpp +++ b/src/storage/mutate/AddVerticesProcessor.cpp @@ -81,9 +81,6 @@ void AddVerticesProcessor::doProcess(const cpp2::AddVerticesRequest& req) { code = nebula::cpp2::ErrorCode::E_INVALID_VID; break; } - if (FLAGS_use_vertex_key) { - data.emplace_back(NebulaKeyUtils::vertexKey(spaceVidLen_, partId, vid), ""); - } for (auto& newTag : newTags) { auto tagId = newTag.get_tag_id(); VLOG(3) << "PartitionID: " << partId << ", VertexID: " << vid << ", TagID: " << tagId; @@ -161,9 +158,7 @@ void AddVerticesProcessor::doProcessWithIndex(const cpp2::AddVerticesRequest& re code = nebula::cpp2::ErrorCode::E_INVALID_VID; break; } - if (FLAGS_use_vertex_key) { - verticeData.emplace_back(NebulaKeyUtils::vertexKey(spaceVidLen_, partId, vid)); - } + for (const auto& newTag : newTags) { auto tagId = newTag.get_tag_id(); VLOG(3) << "PartitionID: " << partId << ", VertexID: " << vid << ", TagID: " << tagId;