Skip to content

Commit 6950c41

Browse files
authored
Fix buggy IC setting leading to performance degradation (merge from main #9707) (#9721)
1 parent adc27fd commit 6950c41

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

ydb/library/actors/interconnect/interconnect_common.h

-8
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,6 @@ namespace NActors {
5555
TDuration MaxErrorSleep = TDuration::Seconds(1);
5656
double ErrorSleepRetryMultiplier = 4.0;
5757
TDuration EventDelay = TDuration::Zero();
58-
59-
ui32 GetSendBufferSize() const {
60-
ui32 res = 512 * 1024; // 512 kb is the default value for send buffer
61-
if (TCPSocketBufferSize) {
62-
res = TCPSocketBufferSize;
63-
}
64-
return res;
65-
}
6658
};
6759

6860
struct TWhiteboardSessionStatus {

ydb/library/actors/interconnect/interconnect_handshake.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ namespace NActors {
150150
}
151151

152152
// setup send buffer size
153-
Socket->SetSendBufferSize(Actor->Common->Settings.GetSendBufferSize());
153+
if (const auto& buffer = Actor->Common->Settings.TCPSocketBufferSize) {
154+
Socket->SetSendBufferSize(buffer);
155+
}
154156
}
155157

156158
void RegisterInPoller() {

ydb/library/actors/interconnect/interconnect_tcp_server.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ namespace NActors {
4141
return error;
4242
}
4343
SetNonBlock(*Listener);
44-
Listener->SetSendBufferSize(ProxyCommonCtx->Settings.GetSendBufferSize()); // TODO(alexvru): WTF?
44+
if (const auto& buffer = ProxyCommonCtx->Settings.TCPSocketBufferSize) {
45+
Listener->SetSendBufferSize(buffer);
46+
}
4547
SetSockOpt(*Listener, SOL_SOCKET, SO_REUSEADDR, 1);
4648
if (addr.GetFamily() == AF_INET6) {
4749
SetSockOpt(*Listener, IPPROTO_IPV6, IPV6_V6ONLY, 0);

0 commit comments

Comments
 (0)