aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2022-09-21 20:17:38 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2022-09-21 20:17:38 +0300
commite6c9b17192c56494adba359d5e132c431b241191 (patch)
tree6f2449871a118a0e8919ce842b1174e06cb470ef /library/cpp/actors/interconnect
parent285021ab1aac39e84b269d9bacd4deee69cf63fc (diff)
downloadydb-e6c9b17192c56494adba359d5e132c431b241191.tar.gz
Ydb stable 22-4-2122.4.21
x-stable-origin-commit: e89099581237299a132feafb5b58af59ebd0468a
Diffstat (limited to 'library/cpp/actors/interconnect')
-rw-r--r--library/cpp/actors/interconnect/CMakeLists.darwin.txt1
-rw-r--r--library/cpp/actors/interconnect/CMakeLists.linux.txt1
-rw-r--r--library/cpp/actors/interconnect/CMakeLists.txt2
-rw-r--r--library/cpp/actors/interconnect/interconnect_handshake.cpp7
-rw-r--r--library/cpp/actors/interconnect/ut/large.cpp2
5 files changed, 8 insertions, 5 deletions
diff --git a/library/cpp/actors/interconnect/CMakeLists.darwin.txt b/library/cpp/actors/interconnect/CMakeLists.darwin.txt
index 9bd0c83fce..f73af2defe 100644
--- a/library/cpp/actors/interconnect/CMakeLists.darwin.txt
+++ b/library/cpp/actors/interconnect/CMakeLists.darwin.txt
@@ -7,6 +7,7 @@
find_package(OpenSSL REQUIRED)
+add_subdirectory(mock)
add_library(cpp-actors-interconnect)
target_link_libraries(cpp-actors-interconnect PUBLIC
diff --git a/library/cpp/actors/interconnect/CMakeLists.linux.txt b/library/cpp/actors/interconnect/CMakeLists.linux.txt
index c0e1b39c45..94a7bda34d 100644
--- a/library/cpp/actors/interconnect/CMakeLists.linux.txt
+++ b/library/cpp/actors/interconnect/CMakeLists.linux.txt
@@ -7,6 +7,7 @@
find_package(OpenSSL REQUIRED)
+add_subdirectory(mock)
add_library(cpp-actors-interconnect)
target_link_libraries(cpp-actors-interconnect PUBLIC
diff --git a/library/cpp/actors/interconnect/CMakeLists.txt b/library/cpp/actors/interconnect/CMakeLists.txt
index fc7b1ee73c..dbfe6fa2c4 100644
--- a/library/cpp/actors/interconnect/CMakeLists.txt
+++ b/library/cpp/actors/interconnect/CMakeLists.txt
@@ -8,6 +8,6 @@
if (APPLE)
include(CMakeLists.darwin.txt)
-elseif (UNIX AND NOT APPLE)
+elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND UNIX AND NOT APPLE)
include(CMakeLists.linux.txt)
endif()
diff --git a/library/cpp/actors/interconnect/interconnect_handshake.cpp b/library/cpp/actors/interconnect/interconnect_handshake.cpp
index aaa8440d72..d7f657299e 100644
--- a/library/cpp/actors/interconnect/interconnect_handshake.cpp
+++ b/library/cpp/actors/interconnect/interconnect_handshake.cpp
@@ -551,6 +551,7 @@ namespace NActors {
// set up incoming socket
SetupSocket();
+ RegisterInPoller();
// wait for initial request packet
TInitialPacket request;
@@ -878,8 +879,11 @@ namespace NActors {
// start connecting
err = -Socket->Connect(address);
if (err == EINPROGRESS) {
+ RegisterInPoller();
WaitPoller(false, true, "WaitConnect");
err = Socket->GetConnectStatus();
+ } else if (!err) {
+ RegisterInPoller();
}
// check if connection succeeded
@@ -915,9 +919,6 @@ namespace NActors {
// setup send buffer size
Socket->SetSendBufferSize(Common->Settings.GetSendBufferSize());
-
- // register in poller
- RegisterInPoller();
}
void RegisterInPoller() {
diff --git a/library/cpp/actors/interconnect/ut/large.cpp b/library/cpp/actors/interconnect/ut/large.cpp
index ba2a50c6f6..192d733325 100644
--- a/library/cpp/actors/interconnect/ut/large.cpp
+++ b/library/cpp/actors/interconnect/ut/large.cpp
@@ -24,7 +24,7 @@ Y_UNIT_TEST_SUITE(LargeMessage) {
void Bootstrap(const TActorContext& ctx) {
Become(&TThis::StateFunc);
ctx.Send(RecipientActorId, new TEvTest(1, "hello"), IEventHandle::FlagTrackDelivery, 1);
- ctx.Send(RecipientActorId, new TEvTest(2, TString(128 * 1024 * 1024, 'X')), IEventHandle::FlagTrackDelivery, 2);
+ ctx.Send(RecipientActorId, new TEvTest(2, TString(150 * 1024 * 1024, 'X')), IEventHandle::FlagTrackDelivery, 2);
}
void Handle(TEvents::TEvUndelivered::TPtr ev, const TActorContext& ctx) {