Skip to content

Commit

Permalink
fix toss switch not set properly (#3119)
Browse files Browse the repository at this point in the history
Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com>
Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com>
  • Loading branch information
3 people authored and Sophie-Xie committed Oct 19, 2021
1 parent 0b763c8 commit 5019b68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
16 changes: 7 additions & 9 deletions src/clients/storage/GraphStorageClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_) {}

Expand Down Expand Up @@ -177,13 +175,13 @@ StorageRpcRespFuture<cpp2::ExecResponse> 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<cpp2::GetPropResponse> GraphStorageClient::getProps(
Expand Down
2 changes: 0 additions & 2 deletions src/clients/storage/GraphStorageClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@ class GraphStorageClient : public StorageClientBase<cpp2::GraphStorageServiceAsy
SessionID session;
ExecutionPlanID plan;
bool profile{false};
bool useToss{false};
bool useExperimentalFeature{false};
folly::EventBase* evb{nullptr};

CommonRequestParam(GraphSpaceID space_,
SessionID sess,
ExecutionPlanID plan_,
bool profile_ = false,
bool toss = false,
bool experimental = false,
folly::EventBase* evb_ = nullptr);

Expand Down

0 comments on commit 5019b68

Please sign in to comment.