diff options
author | grigminakov <[email protected]> | 2023-11-30 17:46:29 +0300 |
---|---|---|
committer | grigminakov <[email protected]> | 2023-11-30 20:41:18 +0300 |
commit | 6239a1866450870ffdb2e6dd30bb17de5b34ea62 (patch) | |
tree | 47c6363631dea55cff7c4a533cf58ef842b9598a | |
parent | d0c6693f5fbc500ad6ed96c0db7af999b87342b0 (diff) |
YT-20546: Supplying address in peer discovery interface
-rw-r--r-- | yt/yt/core/rpc/dynamic_channel_pool.cpp | 8 | ||||
-rw-r--r-- | yt/yt/core/rpc/peer_discovery.cpp | 1 | ||||
-rw-r--r-- | yt/yt/core/rpc/peer_discovery.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/yt/yt/core/rpc/dynamic_channel_pool.cpp b/yt/yt/core/rpc/dynamic_channel_pool.cpp index 3bb45c0548f..f5d3918853c 100644 --- a/yt/yt/core/rpc/dynamic_channel_pool.cpp +++ b/yt/yt/core/rpc/dynamic_channel_pool.cpp @@ -308,6 +308,7 @@ private: auto channel = owner->ChannelFactory_->CreateChannel(address); auto request = owner->PeerDiscovery_->Discover( channel, + address, owner->Config_->DiscoverTimeout, /*replyDelay*/ TDuration::Zero(), owner->ServiceName_); @@ -533,7 +534,12 @@ private: 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); diff --git a/yt/yt/core/rpc/peer_discovery.cpp b/yt/yt/core/rpc/peer_discovery.cpp index 5b3d031cff2..696051c419a 100644 --- a/yt/yt/core/rpc/peer_discovery.cpp +++ b/yt/yt/core/rpc/peer_discovery.cpp @@ -20,6 +20,7 @@ public: TFuture<TPeerDiscoveryResponse> Discover( IChannelPtr channel, + const TString& /*address*/, TDuration timeout, TDuration replyDelay, const std::string& serviceName) override diff --git a/yt/yt/core/rpc/peer_discovery.h b/yt/yt/core/rpc/peer_discovery.h index a7120e2b339..6157196ad6a 100644 --- a/yt/yt/core/rpc/peer_discovery.h +++ b/yt/yt/core/rpc/peer_discovery.h @@ -17,6 +17,7 @@ struct IPeerDiscovery { virtual TFuture<TPeerDiscoveryResponse> Discover( IChannelPtr channel, + const TString& address, TDuration timeout, TDuration replyDelay, const std::string& serviceName) = 0; |