Skip to content

Commit

Permalink
YT-20546: Supplying address in peer discovery interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaoadt committed Nov 30, 2023
1 parent d0c6693 commit 6239a18
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion yt/yt/core/rpc/dynamic_channel_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ class TDynamicChannelPool::TImpl
auto channel = owner->ChannelFactory_->CreateChannel(address);
auto request = owner->PeerDiscovery_->Discover(
channel,
address,
owner->Config_->DiscoverTimeout,
/*replyDelay*/ TDuration::Zero(),
owner->ServiceName_);
Expand Down Expand Up @@ -533,7 +534,12 @@ class TDynamicChannelPool::TImpl

auto channel = owner->ChannelFactory_->CreateChannel(PeerAddress_);
auto requestTimeout = peerPollingPeriod + owner->Config_->PeerPollingRequestTimeout;
auto req = owner->PeerDiscovery_->Discover(channel, requestTimeout, /*replyDelay*/ peerPollingPeriod, owner->ServiceName_);
auto req = owner->PeerDiscovery_->Discover(
channel,
PeerAddress_,
requestTimeout,
/*replyDelay*/ peerPollingPeriod,
owner->ServiceName_);
YT_LOG_DEBUG("Polling peer (PollingPeriod: %v, RequestTimeout: %v)",
peerPollingPeriod,
requestTimeout);
Expand Down
1 change: 1 addition & 0 deletions yt/yt/core/rpc/peer_discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TDefaultPeerDiscovery

TFuture<TPeerDiscoveryResponse> Discover(
IChannelPtr channel,
const TString& /*address*/,
TDuration timeout,
TDuration replyDelay,
const std::string& serviceName) override
Expand Down
1 change: 1 addition & 0 deletions yt/yt/core/rpc/peer_discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct IPeerDiscovery
{
virtual TFuture<TPeerDiscoveryResponse> Discover(
IChannelPtr channel,
const TString& address,
TDuration timeout,
TDuration replyDelay,
const std::string& serviceName) = 0;
Expand Down

0 comments on commit 6239a18

Please sign in to comment.