Skip to content

Commit

Permalink
Fix buggy IC setting leading to performance degradation (merge from m…
Browse files Browse the repository at this point in the history
…ain #9707) (#9721)
  • Loading branch information
alexvru authored Sep 26, 2024
1 parent adc27fd commit 6950c41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
8 changes: 0 additions & 8 deletions ydb/library/actors/interconnect/interconnect_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ namespace NActors {
TDuration MaxErrorSleep = TDuration::Seconds(1);
double ErrorSleepRetryMultiplier = 4.0;
TDuration EventDelay = TDuration::Zero();

ui32 GetSendBufferSize() const {
ui32 res = 512 * 1024; // 512 kb is the default value for send buffer
if (TCPSocketBufferSize) {
res = TCPSocketBufferSize;
}
return res;
}
};

struct TWhiteboardSessionStatus {
Expand Down
4 changes: 3 additions & 1 deletion ydb/library/actors/interconnect/interconnect_handshake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ namespace NActors {
}

// setup send buffer size
Socket->SetSendBufferSize(Actor->Common->Settings.GetSendBufferSize());
if (const auto& buffer = Actor->Common->Settings.TCPSocketBufferSize) {
Socket->SetSendBufferSize(buffer);
}
}

void RegisterInPoller() {
Expand Down
4 changes: 3 additions & 1 deletion ydb/library/actors/interconnect/interconnect_tcp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ namespace NActors {
return error;
}
SetNonBlock(*Listener);
Listener->SetSendBufferSize(ProxyCommonCtx->Settings.GetSendBufferSize()); // TODO(alexvru): WTF?
if (const auto& buffer = ProxyCommonCtx->Settings.TCPSocketBufferSize) {
Listener->SetSendBufferSize(buffer);
}
SetSockOpt(*Listener, SOL_SOCKET, SO_REUSEADDR, 1);
if (addr.GetFamily() == AF_INET6) {
SetSockOpt(*Listener, IPPROTO_IPV6, IPV6_V6ONLY, 0);
Expand Down

0 comments on commit 6950c41

Please sign in to comment.