diff --git a/src/clients/storage/GraphStorageClient.cpp b/src/clients/storage/GraphStorageClient.cpp index 62c2419c72c..2c0ead60f3f 100644 --- a/src/clients/storage/GraphStorageClient.cpp +++ b/src/clients/storage/GraphStorageClient.cpp @@ -13,6 +13,8 @@ namespace storage { folly::SemiFuture> GraphStorageClient::getNeighbors( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, std::vector colNames, const std::vector& vertices, const std::vector& edgeTypes, @@ -40,6 +42,7 @@ folly::SemiFuture> GraphStorageCl } auto& clusters = status.value(); + auto common = makeRequestCommon(session, plan); std::unordered_map requests; for (auto& c : clusters) { auto& host = c.first; @@ -47,7 +50,7 @@ folly::SemiFuture> GraphStorageCl req.set_space_id(space); req.set_column_names(colNames); req.set_parts(std::move(c.second)); - + req.set_common(common); cpp2::TraverseSpec spec; spec.set_edge_types(edgeTypes); spec.set_edge_direction(edgeDirection); @@ -85,6 +88,8 @@ folly::SemiFuture> GraphStorageCl folly::SemiFuture> GraphStorageClient::addVertices( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, std::vector vertices, std::unordered_map> propNames, bool ifNotExists, @@ -103,6 +108,7 @@ folly::SemiFuture> GraphStorageClient::ad auto& clusters = status.value(); std::unordered_map requests; + auto common = makeRequestCommon(session, plan); for (auto& c : clusters) { auto& host = c.first; auto& req = requests[host]; @@ -110,6 +116,7 @@ folly::SemiFuture> GraphStorageClient::ad req.set_if_not_exists(ifNotExists); req.set_parts(std::move(c.second)); req.set_prop_names(propNames); + req.set_common(common); } VLOG(3) << "requests size " << requests.size(); @@ -123,6 +130,8 @@ folly::SemiFuture> GraphStorageClient::ad folly::SemiFuture> GraphStorageClient::addEdges( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, std::vector edges, std::vector propNames, bool ifNotExists, @@ -142,6 +151,7 @@ folly::SemiFuture> GraphStorageClient::ad auto& clusters = status.value(); std::unordered_map requests; + auto common = makeRequestCommon(session, plan); for (auto& c : clusters) { auto& host = c.first; auto& req = requests[host]; @@ -149,6 +159,7 @@ folly::SemiFuture> GraphStorageClient::ad req.set_if_not_exists(ifNotExists); req.set_parts(std::move(c.second)); req.set_prop_names(propNames); + req.set_common(common); } return collectResponse( evb, @@ -160,6 +171,8 @@ folly::SemiFuture> GraphStorageClient::ad folly::SemiFuture> GraphStorageClient::getProps( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, const DataSet& input, const std::vector* vertexProps, const std::vector* edgeProps, @@ -183,6 +196,7 @@ folly::SemiFuture> GraphStorageClient: auto& clusters = status.value(); std::unordered_map requests; + auto common = makeRequestCommon(session, plan); for (auto& c : clusters) { auto& host = c.first; auto& req = requests[host]; @@ -205,6 +219,7 @@ folly::SemiFuture> GraphStorageClient: if (filter.size() > 0) { req.set_filter(filter); } + req.set_common(common); } return collectResponse(evb, @@ -214,7 +229,11 @@ folly::SemiFuture> GraphStorageClient: } folly::SemiFuture> GraphStorageClient::deleteEdges( - GraphSpaceID space, std::vector edges, folly::EventBase* evb) { + GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, + std::vector edges, + folly::EventBase* evb) { auto cbStatus = getIdFromEdgeKey(space); if (!cbStatus.ok()) { return folly::makeFuture>( @@ -229,11 +248,13 @@ folly::SemiFuture> GraphStorageClient::de auto& clusters = status.value(); std::unordered_map requests; + auto common = makeRequestCommon(session, plan); for (auto& c : clusters) { auto& host = c.first; auto& req = requests[host]; req.set_space_id(space); req.set_parts(std::move(c.second)); + req.set_common(common); } return collectResponse( @@ -245,7 +266,11 @@ folly::SemiFuture> GraphStorageClient::de } folly::SemiFuture> GraphStorageClient::deleteVertices( - GraphSpaceID space, std::vector ids, folly::EventBase* evb) { + GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, + std::vector ids, + folly::EventBase* evb) { auto cbStatus = getIdFromValue(space); if (!cbStatus.ok()) { return folly::makeFuture>( @@ -260,11 +285,13 @@ folly::SemiFuture> GraphStorageClient::de auto& clusters = status.value(); std::unordered_map requests; + auto common = makeRequestCommon(session, plan); for (auto& c : clusters) { auto& host = c.first; auto& req = requests[host]; req.set_space_id(space); req.set_parts(std::move(c.second)); + req.set_common(common); } return collectResponse( @@ -276,7 +303,11 @@ folly::SemiFuture> GraphStorageClient::de } folly::SemiFuture> GraphStorageClient::deleteTags( - GraphSpaceID space, std::vector delTags, folly::EventBase* evb) { + GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, + std::vector delTags, + folly::EventBase* evb) { auto cbStatus = getIdFromDelTags(space); if (!cbStatus.ok()) { return folly::makeFuture>( @@ -291,11 +322,13 @@ folly::SemiFuture> GraphStorageClient::de auto& clusters = status.value(); std::unordered_map requests; + auto common = makeRequestCommon(session, plan); for (auto& c : clusters) { auto& host = c.first; auto& req = requests[host]; req.set_space_id(space); req.set_parts(std::move(c.second)); + req.set_common(common); } return collectResponse( @@ -308,6 +341,8 @@ folly::SemiFuture> GraphStorageClient::de folly::Future> GraphStorageClient::updateVertex( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, Value vertexId, TagID tagId, std::vector updatedProps, @@ -347,6 +382,7 @@ folly::Future> GraphStorageClient::updat req.set_updated_props(std::move(updatedProps)); req.set_return_props(std::move(returnProps)); req.set_insertable(insertable); + req.set_common(makeRequestCommon(session, plan)); if (condition.size() > 0) { req.set_condition(std::move(condition)); } @@ -362,6 +398,8 @@ folly::Future> GraphStorageClient::updat folly::Future> GraphStorageClient::updateEdge( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, storage::cpp2::EdgeKey edgeKey, std::vector updatedProps, bool insertable, @@ -399,6 +437,7 @@ folly::Future> GraphStorageClient::updat req.set_updated_props(std::move(updatedProps)); req.set_return_props(std::move(returnProps)); req.set_insertable(insertable); + req.set_common(makeRequestCommon(session, plan)); if (condition.size() > 0) { req.set_condition(std::move(condition)); } @@ -446,6 +485,8 @@ folly::Future> GraphStorageClient::getUUID(GraphSpac folly::SemiFuture> GraphStorageClient::lookupIndex( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, const std::vector& contexts, bool isEdge, int32_t tagOrEdge, @@ -459,6 +500,7 @@ folly::SemiFuture> GraphStorageClient: auto& clusters = status.value(); std::unordered_map requests; + auto common = makeRequestCommon(session, plan); for (auto& c : clusters) { auto& host = c.first; auto& req = requests[host]; @@ -470,8 +512,8 @@ folly::SemiFuture> GraphStorageClient: spec.set_contexts(contexts); spec.set_is_edge(isEdge); spec.set_tag_or_edge_id(tagOrEdge); - req.set_indices(spec); + req.set_common(common); } return collectResponse( @@ -484,6 +526,8 @@ folly::SemiFuture> GraphStorageClient: folly::SemiFuture> GraphStorageClient::lookupAndTraverse(GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, cpp2::IndexSpec indexSpec, cpp2::TraverseSpec traverseSpec, folly::EventBase* evb) { @@ -495,6 +539,7 @@ GraphStorageClient::lookupAndTraverse(GraphSpaceID space, auto& clusters = status.value(); std::unordered_map requests; + auto common = makeRequestCommon(session, plan); for (auto& c : clusters) { auto& host = c.first; auto& req = requests[host]; @@ -502,6 +547,7 @@ GraphStorageClient::lookupAndTraverse(GraphSpaceID space, req.set_parts(std::move(c.second)); req.set_indices(indexSpec); req.set_traverse_spec(traverseSpec); + req.set_common(common); } return collectResponse( @@ -740,6 +786,13 @@ StatusOr> GraphStorageClien } return cb; } +cpp2::RequestCommon GraphStorageClient::makeRequestCommon(SessionID sessionId, + ExecutionPlanID planId) { + cpp2::RequestCommon common; + common.set_session_id(sessionId); + common.set_plan_id(planId); + return common; +} } // namespace storage } // namespace nebula diff --git a/src/clients/storage/GraphStorageClient.h b/src/clients/storage/GraphStorageClient.h index ddf27e3f8c9..665234fbda6 100644 --- a/src/clients/storage/GraphStorageClient.h +++ b/src/clients/storage/GraphStorageClient.h @@ -34,6 +34,8 @@ class GraphStorageClient : public StorageClientBase> getNeighbors( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, std::vector colNames, // The first column has to be the VertexID const std::vector& vertices, @@ -52,6 +54,8 @@ class GraphStorageClient : public StorageClientBase> getProps( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, const DataSet& input, const std::vector* vertexProps, const std::vector* edgeProps, @@ -64,6 +68,8 @@ class GraphStorageClient : public StorageClientBase> addVertices( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, std::vector vertices, std::unordered_map> propNames, bool ifNotExists, @@ -71,6 +77,8 @@ class GraphStorageClient : public StorageClientBase> addEdges( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, std::vector edges, std::vector propNames, bool ifNotExists, @@ -79,17 +87,29 @@ class GraphStorageClient : public StorageClientBase> deleteEdges( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, std::vector edges, folly::EventBase* evb = nullptr); folly::SemiFuture> deleteVertices( - GraphSpaceID space, std::vector ids, folly::EventBase* evb = nullptr); + GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, + std::vector ids, + folly::EventBase* evb = nullptr); folly::SemiFuture> deleteTags( - GraphSpaceID space, std::vector delTags, folly::EventBase* evb = nullptr); + GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, + std::vector delTags, + folly::EventBase* evb = nullptr); folly::Future> updateVertex( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, Value vertexId, TagID tagId, std::vector updatedProps, @@ -100,6 +120,8 @@ class GraphStorageClient : public StorageClientBase> updateEdge( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, storage::cpp2::EdgeKey edgeKey, std::vector updatedProps, bool insertable, @@ -113,6 +135,8 @@ class GraphStorageClient : public StorageClientBase> lookupIndex( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, const std::vector& contexts, bool isEdge, int32_t tagOrEdge, @@ -121,6 +145,8 @@ class GraphStorageClient : public StorageClientBase> lookupAndTraverse( GraphSpaceID space, + SessionID session, + ExecutionPlanID plan, cpp2::IndexSpec indexSpec, cpp2::TraverseSpec traverseSpec, folly::EventBase* evb = nullptr); @@ -148,6 +174,8 @@ class GraphStorageClient : public StorageClientBase> getIdFromDelTags( GraphSpaceID space) const; + + cpp2::RequestCommon makeRequestCommon(SessionID sessionId, ExecutionPlanID planId); }; } // namespace storage diff --git a/src/graph/executor/mutate/DeleteExecutor.cpp b/src/graph/executor/mutate/DeleteExecutor.cpp index cd7dfd15ea0..ee14c804ddc 100644 --- a/src/graph/executor/mutate/DeleteExecutor.cpp +++ b/src/graph/executor/mutate/DeleteExecutor.cpp @@ -63,7 +63,8 @@ folly::Future DeleteVerticesExecutor::deleteVertices() { time::Duration deleteVertTime; return qctx() ->getStorageClient() - ->deleteVertices(spaceId, std::move(vertices)) + ->deleteVertices( + spaceId, qctx()->rctx()->session()->id(), qctx()->plan()->id(), std::move(vertices)) .via(runner()) .ensure([deleteVertTime]() { VLOG(1) << "Delete vertices time: " << deleteVertTime.elapsedInUSec() << "us"; @@ -116,7 +117,8 @@ folly::Future DeleteTagsExecutor::deleteTags() { time::Duration deleteTagTime; return qctx() ->getStorageClient() - ->deleteTags(spaceId, std::move(delTags)) + ->deleteTags( + spaceId, qctx()->rctx()->session()->id(), qctx()->plan()->id(), std::move(delTags)) .via(runner()) .ensure([deleteTagTime]() { VLOG(1) << "Delete vertices time: " << deleteTagTime.elapsedInUSec() << "us"; @@ -198,7 +200,8 @@ folly::Future DeleteEdgesExecutor::deleteEdges() { time::Duration deleteEdgeTime; return qctx() ->getStorageClient() - ->deleteEdges(spaceId, std::move(edgeKeys)) + ->deleteEdges( + spaceId, qctx()->rctx()->session()->id(), qctx()->plan()->id(), std::move(edgeKeys)) .via(runner()) .ensure([deleteEdgeTime]() { VLOG(1) << "Delete edge time: " << deleteEdgeTime.elapsedInUSec() << "us"; diff --git a/src/graph/executor/mutate/InsertExecutor.cpp b/src/graph/executor/mutate/InsertExecutor.cpp index 7ddce44ae2a..55eb86ca087 100644 --- a/src/graph/executor/mutate/InsertExecutor.cpp +++ b/src/graph/executor/mutate/InsertExecutor.cpp @@ -23,6 +23,8 @@ folly::Future InsertVerticesExecutor::insertVertices() { return qctx() ->getStorageClient() ->addVertices(ivNode->getSpace(), + qctx()->rctx()->session()->id(), + qctx()->plan()->id(), ivNode->getVertices(), ivNode->getPropNames(), ivNode->getIfNotExists()) @@ -47,6 +49,8 @@ folly::Future InsertEdgesExecutor::insertEdges() { return qctx() ->getStorageClient() ->addEdges(ieNode->getSpace(), + qctx()->rctx()->session()->id(), + qctx()->plan()->id(), ieNode->getEdges(), ieNode->getPropNames(), ieNode->getIfNotExists(), diff --git a/src/graph/executor/mutate/UpdateExecutor.cpp b/src/graph/executor/mutate/UpdateExecutor.cpp index 4fc7870ac1a..b33752f309a 100644 --- a/src/graph/executor/mutate/UpdateExecutor.cpp +++ b/src/graph/executor/mutate/UpdateExecutor.cpp @@ -48,6 +48,8 @@ folly::Future UpdateVertexExecutor::execute() { return qctx() ->getStorageClient() ->updateVertex(uvNode->getSpaceId(), + qctx()->rctx()->session()->id(), + qctx()->plan()->id(), uvNode->getVId(), uvNode->getTagId(), uvNode->getUpdatedProps(), @@ -96,6 +98,8 @@ folly::Future UpdateEdgeExecutor::execute() { return qctx() ->getStorageClient() ->updateEdge(ueNode->getSpaceId(), + qctx()->rctx()->session()->id(), + qctx()->plan()->id(), edgeKey, ueNode->getUpdatedProps(), ueNode->getInsertable(), diff --git a/src/graph/executor/query/GetEdgesExecutor.cpp b/src/graph/executor/query/GetEdgesExecutor.cpp index b3a559601d0..bd6432edea9 100644 --- a/src/graph/executor/query/GetEdgesExecutor.cpp +++ b/src/graph/executor/query/GetEdgesExecutor.cpp @@ -69,6 +69,8 @@ folly::Future GetEdgesExecutor::getEdges() { time::Duration getPropsTime; return DCHECK_NOTNULL(client) ->getProps(ge->space(), + qctx()->rctx()->session()->id(), + qctx()->plan()->id(), std::move(edges), nullptr, ge->props(), diff --git a/src/graph/executor/query/GetNeighborsExecutor.cpp b/src/graph/executor/query/GetNeighborsExecutor.cpp index d7ace30770c..bcef5147823 100644 --- a/src/graph/executor/query/GetNeighborsExecutor.cpp +++ b/src/graph/executor/query/GetNeighborsExecutor.cpp @@ -44,6 +44,8 @@ folly::Future GetNeighborsExecutor::execute() { GraphStorageClient* storageClient = qctx_->getStorageClient(); return storageClient ->getNeighbors(gn_->space(), + qctx()->rctx()->session()->id(), + qctx()->plan()->id(), std::move(reqDs.colNames), std::move(reqDs.rows), gn_->edgeTypes(), diff --git a/src/graph/executor/query/GetVerticesExecutor.cpp b/src/graph/executor/query/GetVerticesExecutor.cpp index c3605f7eb8c..ef3e4486d7f 100644 --- a/src/graph/executor/query/GetVerticesExecutor.cpp +++ b/src/graph/executor/query/GetVerticesExecutor.cpp @@ -36,6 +36,8 @@ folly::Future GetVerticesExecutor::getVertices() { time::Duration getPropsTime; return DCHECK_NOTNULL(storageClient) ->getProps(gv->space(), + qctx()->rctx()->session()->id(), + qctx()->plan()->id(), std::move(vertices), gv->props(), nullptr, diff --git a/src/graph/executor/query/IndexScanExecutor.cpp b/src/graph/executor/query/IndexScanExecutor.cpp index 94a33158020..c85cf74ee7f 100644 --- a/src/graph/executor/query/IndexScanExecutor.cpp +++ b/src/graph/executor/query/IndexScanExecutor.cpp @@ -37,8 +37,13 @@ folly::Future IndexScanExecutor::indexScan() { } return storageClient - ->lookupIndex( - lookup->space(), ictxs, lookup->isEdge(), lookup->schemaId(), lookup->returnColumns()) + ->lookupIndex(lookup->space(), + qctx()->rctx()->session()->id(), + qctx()->plan()->id(), + ictxs, + lookup->isEdge(), + lookup->schemaId(), + lookup->returnColumns()) .via(runner()) .thenValue([this](StorageRpcResponse &&rpcResp) { return handleResp(std::move(rpcResp)); diff --git a/src/storage/mutate/UpdateEdgeProcessor.cpp b/src/storage/mutate/UpdateEdgeProcessor.cpp index dee14f75af6..af79246902a 100644 --- a/src/storage/mutate/UpdateEdgeProcessor.cpp +++ b/src/storage/mutate/UpdateEdgeProcessor.cpp @@ -53,6 +53,7 @@ void UpdateEdgeProcessor::doProcess(const cpp2::UpdateEdgeRequest& req) { } this->planContext_ = std::make_unique( this->env_, spaceId_, this->spaceVidLen_, this->isIntId_, req.common_ref()); + context_ = std::make_unique(planContext_.get()); if (env_->txnMan_ && env_->txnMan_->enableToss(spaceId_)) { planContext_->defaultEdgeVer_ = 1L; } diff --git a/src/storage/mutate/UpdateVertexProcessor.cpp b/src/storage/mutate/UpdateVertexProcessor.cpp index df4228bc1d6..c181ab0257e 100644 --- a/src/storage/mutate/UpdateVertexProcessor.cpp +++ b/src/storage/mutate/UpdateVertexProcessor.cpp @@ -52,6 +52,7 @@ void UpdateVertexProcessor::doProcess(const cpp2::UpdateVertexRequest& req) { } this->planContext_ = std::make_unique( this->env_, spaceId_, this->spaceVidLen_, this->isIntId_, req.common_ref()); + context_ = std::make_unique(planContext_.get()); retCode = checkAndBuildContexts(req); if (retCode != nebula::cpp2::ErrorCode::SUCCEEDED) { diff --git a/src/storage/test/TossEnvironment.h b/src/storage/test/TossEnvironment.h index 6a4c673b315..3cb82fbc2b9 100644 --- a/src/storage/test/TossEnvironment.h +++ b/src/storage/test/TossEnvironment.h @@ -228,7 +228,7 @@ struct TossEnvironment { folly::SemiFuture> addEdgesAsync( const std::vector& edges, bool useToss = true) { auto propNames = makeColNames(edges.back().get_props().size()); - return sClient_->addEdges(spaceId_, edges, propNames, true, nullptr, useToss); + return sClient_->addEdges(spaceId_, 0, 0, edges, propNames, true, nullptr, useToss); } static std::vector makeColNames(size_t n) { @@ -265,6 +265,8 @@ struct TossEnvironment { do { auto frpc = sClient_ ->getProps(spaceId_, + 0, + 0, ds, /*DataSet*/ nullptr, /*vector*/ &props, /*vector*/ @@ -358,6 +360,8 @@ struct TossEnvironment { auto colNames = makeColNames(edges.back().get_props().size()); return sClient_->getNeighbors(spaceId_, + 0, + 0, colNames, vertices, edgeTypes, diff --git a/src/tools/storage-perf/StorageIntegrityTool.cpp b/src/tools/storage-perf/StorageIntegrityTool.cpp index aeb90983760..1a7438dbb08 100644 --- a/src/tools/storage-perf/StorageIntegrityTool.cpp +++ b/src/tools/storage-perf/StorageIntegrityTool.cpp @@ -170,7 +170,8 @@ class IntegrityTest { void addVertex(std::vector& prev, std::vector& cur, VertexID startId) { std::unordered_map> propNames; propNames[tagId_].emplace_back(propName_); - auto future = client_->addVertices(spaceId_, genVertices(prev, cur, startId), propNames, true); + auto future = + client_->addVertices(spaceId_, 0, 0, genVertices(prev, cur, startId), propNames, true); auto resp = std::move(future).get(); if (!resp.succeeded()) { for (auto& err : resp.failedParts()) { @@ -225,7 +226,7 @@ class IntegrityTest { tagProp.set_tag(tagId_); (*tagProp.props_ref()).emplace_back(propName_); DataSet dataset({kVid}); - auto future = client_->getProps(spaceId_, dataset, &props, nullptr, nullptr); + auto future = client_->getProps(spaceId_, 0, 0, dataset, &props, nullptr, nullptr); auto resp = std::move(future).get(); if (!resp.succeeded()) { LOG(ERROR) << "Failed to fetch props of vertex " << nextId; diff --git a/src/tools/storage-perf/StoragePerfTool.cpp b/src/tools/storage-perf/StoragePerfTool.cpp index 8817041c788..fd045ab07dc 100644 --- a/src/tools/storage-perf/StoragePerfTool.cpp +++ b/src/tools/storage-perf/StoragePerfTool.cpp @@ -300,6 +300,8 @@ class Perf { graphStorageClient_ ->getNeighbors(spaceId_, + 0, + 0, colNames, vertices, {edgeType_}, @@ -332,7 +334,7 @@ class Perf { auto tokens = tokenBucket_.consumeOrDrain(FLAGS_concurrency, FLAGS_qps, FLAGS_concurrency); for (auto i = 0; i < tokens; i++) { auto start = time::WallClock::fastNowInMicroSec(); - graphStorageClient_->addVertices(spaceId_, genVertices(), tagProps_, true) + graphStorageClient_->addVertices(spaceId_, 0, 0, genVertices(), tagProps_, true) .via(evb) .thenValue([this, start](auto&& resps) { if (!resps.succeeded()) { @@ -360,7 +362,7 @@ class Perf { auto tokens = tokenBucket_.consumeOrDrain(FLAGS_concurrency, FLAGS_qps, FLAGS_concurrency); for (auto i = 0; i < tokens; i++) { auto start = time::WallClock::fastNowInMicroSec(); - graphStorageClient_->addEdges(spaceId_, genEdges(), edgeProps_, true) + graphStorageClient_->addEdges(spaceId_, 0, 0, genEdges(), edgeProps_, true) .via(evb) .thenValue([this, start](auto&& resps) { if (!resps.succeeded()) { @@ -392,21 +394,22 @@ class Perf { input.emplace_back(std::move(row)); auto vProps = vertexProps(); auto start = time::WallClock::fastNowInMicroSec(); - auto f = graphStorageClient_->getProps(spaceId_, std::move(input), &vProps, nullptr, nullptr) - .via(evb) - .thenValue([this, start](auto&& resps) { - if (!resps.succeeded()) { - LOG(ERROR) << "Request failed!"; - } else { - VLOG(3) << "request successed!"; - } - this->finishedRequests_++; - auto now = time::WallClock::fastNowInMicroSec(); - latencies_.addValue(std::chrono::seconds(time::WallClock::fastNowInSec()), - now - start); - qps_.addValue(std::chrono::seconds(time::WallClock::fastNowInSec()), 1); - }) - .thenError([](auto&&) { LOG(ERROR) << "Request failed!"; }); + auto f = + graphStorageClient_->getProps(spaceId_, 0, 0, std::move(input), &vProps, nullptr, nullptr) + .via(evb) + .thenValue([this, start](auto&& resps) { + if (!resps.succeeded()) { + LOG(ERROR) << "Request failed!"; + } else { + VLOG(3) << "request successed!"; + } + this->finishedRequests_++; + auto now = time::WallClock::fastNowInMicroSec(); + latencies_.addValue(std::chrono::seconds(time::WallClock::fastNowInSec()), + now - start); + qps_.addValue(std::chrono::seconds(time::WallClock::fastNowInSec()), 1); + }) + .thenError([](auto&&) { LOG(ERROR) << "Request failed!"; }); } void getEdgesTask() { @@ -417,21 +420,22 @@ class Perf { input.emplace_back(std::move(row)); auto eProps = edgeProps(); auto start = time::WallClock::fastNowInMicroSec(); - auto f = graphStorageClient_->getProps(spaceId_, std::move(input), nullptr, &eProps, nullptr) - .via(evb) - .thenValue([this, start](auto&& resps) { - if (!resps.succeeded()) { - LOG(ERROR) << "Request failed!"; - } else { - VLOG(3) << "request successed!"; - } - this->finishedRequests_++; - auto now = time::WallClock::fastNowInMicroSec(); - latencies_.addValue(std::chrono::seconds(time::WallClock::fastNowInSec()), - now - start); - qps_.addValue(std::chrono::seconds(time::WallClock::fastNowInSec()), 1); - }) - .thenError([](auto&&) { LOG(ERROR) << "Request failed!"; }); + auto f = + graphStorageClient_->getProps(spaceId_, 0, 0, std::move(input), nullptr, &eProps, nullptr) + .via(evb) + .thenValue([this, start](auto&& resps) { + if (!resps.succeeded()) { + LOG(ERROR) << "Request failed!"; + } else { + VLOG(3) << "request successed!"; + } + this->finishedRequests_++; + auto now = time::WallClock::fastNowInMicroSec(); + latencies_.addValue(std::chrono::seconds(time::WallClock::fastNowInSec()), + now - start); + qps_.addValue(std::chrono::seconds(time::WallClock::fastNowInSec()), 1); + }) + .thenError([](auto&&) { LOG(ERROR) << "Request failed!"; }); } private: