Skip to content

Commit

Permalink
Revert "Revert "update client-c to support choosing non pending peer …
Browse files Browse the repository at this point in the history
…when dis…" (#7586)
  • Loading branch information
wuhuizuo authored Jun 1, 2023
1 parent 90772ef commit 03f3012
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 25 deletions.
22 changes: 0 additions & 22 deletions dbms/src/Storages/StorageDisaggregatedRemote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,6 @@
#include <numeric>
#include <unordered_set>

namespace pingcap::kv
{
// The rpc trait
template <>
struct RpcTypeTraits<disaggregated::EstablishDisaggTaskRequest>
{
using RequestType = disaggregated::EstablishDisaggTaskRequest;
using ResultType = disaggregated::EstablishDisaggTaskResponse;

static const char * err_msg() { return "EstablishDisaggTask Failed"; } // NOLINT(readability-identifier-naming)

static ::grpc::Status doRPCCall(
grpc::ClientContext * context,
std::shared_ptr<KvConnClient> client,
const RequestType & req,
ResultType * res)
{
return client->stub->EstablishDisaggTask(context, req, res);
}
};
} // namespace pingcap::kv

namespace DB
{

Expand Down
3 changes: 2 additions & 1 deletion dbms/src/Storages/Transaction/FastAddPeer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ FastAddPeerRes genFastAddPeerRes(FastAddPeerStatus status, std::string && apply_
std::vector<StoreID> getCandidateStoreIDsForRegion(TMTContext & tmt_context, UInt64 region_id, UInt64 current_store_id)
{
auto pd_client = tmt_context.getPDClient();
auto [region, _] = pd_client->getRegionByID(region_id);
auto resp = pd_client->getRegionByID(region_id);
const auto & region = resp.region();
std::vector<StoreID> store_ids;
store_ids.reserve(region.peers_size());
for (const auto & peer : region.peers())
Expand Down

0 comments on commit 03f3012

Please sign in to comment.