From 5019b683b6d851698c6be2b46ce5785b54035bdf Mon Sep 17 00:00:00 2001 From: "lionel.liu@vesoft.com" <52276794+liuyu85cn@users.noreply.github.com> Date: Tue, 19 Oct 2021 09:58:40 +0800 Subject: [PATCH] fix toss switch not set properly (#3119) Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com> Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> --- src/clients/storage/GraphStorageClient.cpp | 16 +++++++--------- src/clients/storage/GraphStorageClient.h | 2 -- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/clients/storage/GraphStorageClient.cpp b/src/clients/storage/GraphStorageClient.cpp index 860682f44cf..0ffeb31e5ac 100644 --- a/src/clients/storage/GraphStorageClient.cpp +++ b/src/clients/storage/GraphStorageClient.cpp @@ -19,14 +19,12 @@ GraphStorageClient::CommonRequestParam::CommonRequestParam(GraphSpaceID space_, SessionID sess, ExecutionPlanID plan_, bool profile_, - bool toss, bool experimental, folly::EventBase* evb_) : space(space_), session(sess), plan(plan_), profile(profile_), - useToss(toss), useExperimentalFeature(experimental), evb(evb_) {} @@ -177,13 +175,13 @@ StorageRpcRespFuture GraphStorageClient::addEdges( req.set_prop_names(propNames); req.set_common(common); } - return collectResponse(param.evb, - std::move(requests), - [useToss = param.useToss](cpp2::GraphStorageServiceAsyncClient* client, - const cpp2::AddEdgesRequest& r) { - return useToss ? client->future_chainAddEdges(r) - : client->future_addEdges(r); - }); + return collectResponse( + param.evb, + std::move(requests), + [useToss = param.useExperimentalFeature](cpp2::GraphStorageServiceAsyncClient* client, + const cpp2::AddEdgesRequest& r) { + return useToss ? client->future_chainAddEdges(r) : client->future_addEdges(r); + }); } StorageRpcRespFuture GraphStorageClient::getProps( diff --git a/src/clients/storage/GraphStorageClient.h b/src/clients/storage/GraphStorageClient.h index 3234116f749..80f25ec3bbc 100644 --- a/src/clients/storage/GraphStorageClient.h +++ b/src/clients/storage/GraphStorageClient.h @@ -33,7 +33,6 @@ class GraphStorageClient : public StorageClientBase