diff options
author | Tony-Romanov <150126326+Tony-Romanov@users.noreply.github.com> | 2025-04-30 11:11:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-30 12:11:58 +0300 |
commit | 757b1c76fde76e9ef9f02ebb6ea808d02bbbca7d (patch) | |
tree | 6f2365fbe25d02a4e84d18d83f7966c0ca4e8706 | |
parent | c9b4474f81d1873139bf2c768bc5c5ab6687878d (diff) | |
download | ydb-757b1c76fde76e9ef9f02ebb6ea808d02bbbca7d.tar.gz |
A little fix of logs and drop unused code. (#17621)
-rw-r--r-- | ydb/library/actors/core/interconnect.h | 4 | ||||
-rw-r--r-- | ydb/library/actors/interconnect/interconnect_handshake.cpp | 18 | ||||
-rw-r--r-- | ydb/library/actors/interconnect/interconnect_impl.h | 10 |
3 files changed, 6 insertions, 26 deletions
diff --git a/ydb/library/actors/core/interconnect.h b/ydb/library/actors/core/interconnect.h index f9ca2efa49e..64700ab1701 100644 --- a/ydb/library/actors/core/interconnect.h +++ b/ydb/library/actors/core/interconnect.h @@ -123,7 +123,7 @@ namespace NActors { enum EEv { EvForward = EventSpaceBegin(TEvents::ES_INTERCONNECT), EvResolveNode, // resolve info about node (internal) - EvNodeAddress, // node info (internal) + EvStubForUnused, EvConnectNode, // request proxy to establish connection (like: we would send something there soon) EvAcceptIncoming, EvNodeConnected, // node connected notify @@ -150,8 +150,6 @@ namespace NActors { static_assert(EvEnd < EventSpaceEnd(TEvents::ES_INTERCONNECT), "expect EvEnd < EventSpaceEnd(TEvents::ES_INTERCONNECT)"); - struct TEvNodeAddress; - struct TEvConnectNode: public TEventLocal<TEvConnectNode, EvConnectNode> { }; diff --git a/ydb/library/actors/interconnect/interconnect_handshake.cpp b/ydb/library/actors/interconnect/interconnect_handshake.cpp index fe4710058f0..8311a558a70 100644 --- a/ydb/library/actors/interconnect/interconnect_handshake.cpp +++ b/ydb/library/actors/interconnect/interconnect_handshake.cpp @@ -431,7 +431,6 @@ namespace NActors { [[fallthrough]]; case ui32(ENetwork::NodeInfo): - case TEvInterconnect::EvNodeAddress: case ui32(ENetwork::ResolveError): break; // most likely a race with resolve timeout @@ -821,28 +820,21 @@ namespace NActors { Send(Common->NameserviceId, new TEvInterconnect::TEvResolveNode(PeerNodeId, Deadline)); // wait for the result - auto ev = WaitForSpecificEvent<TEvResolveError, TEvLocalNodeInfo, TEvInterconnect::TEvNodeAddress>( - "ValidateIncomingPeerViaDirectLookup", mono + ResolveTimeout); + const auto ev = WaitForSpecificEvent<TEvResolveError, TEvLocalNodeInfo>("ValidateIncomingPeerViaDirectLookup", mono + ResolveTimeout); // extract address from the result std::vector<NInterconnect::TAddress> addresses; if (!ev) { - Fail(TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT, "DNS resolve timed out", true); + Fail(TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT, "DynamicNS response timed out"); } else if (auto *p = ev->CastAsLocal<TEvLocalNodeInfo>()) { addresses = std::move(p->Addresses); if (addresses.empty()) { - Fail(TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT, "DNS resolve error: no address returned", true); + Fail(TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT, "DynamicNS knows nothing about the node " + ToString(PeerNodeId)); } - } else if (auto *p = ev->CastAsLocal<TEvInterconnect::TEvNodeAddress>()) { - const auto& r = p->Record; - if (!r.HasAddress() || !r.HasPort()) { - Fail(TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT, "DNS resolve error: no address returned", true); - } - addresses.emplace_back(r.GetAddress(), static_cast<ui16>(r.GetPort())); } else { Y_ABORT_UNLESS(ev->GetTypeRewrite() == ui32(ENetwork::ResolveError)); - Fail(TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT, "DNS resolve error: " + ev->Get<TEvResolveError>()->Explain - + ", Unresolved host# " + ev->Get<TEvResolveError>()->Host, true); + Fail(TEvHandshakeFail::HANDSHAKE_FAIL_PERMANENT, "DynamicNS resolve error: " + ev->Get<TEvResolveError>()->Explain + + ", Unresolved host# " + ev->Get<TEvResolveError>()->Host); } return addresses; diff --git a/ydb/library/actors/interconnect/interconnect_impl.h b/ydb/library/actors/interconnect/interconnect_impl.h index b4be6f37d1c..07070deb920 100644 --- a/ydb/library/actors/interconnect/interconnect_impl.h +++ b/ydb/library/actors/interconnect/interconnect_impl.h @@ -6,16 +6,6 @@ #include <library/cpp/monlib/dynamic_counters/counters.h> namespace NActors { - // node info - struct TEvInterconnect::TEvNodeAddress: public TEventPB<TEvInterconnect::TEvNodeAddress, NActorsInterconnect::TEvNodeInfo, TEvInterconnect::EvNodeAddress> { - TEvNodeAddress() { - } - - TEvNodeAddress(ui32 nodeId) { - Record.SetNodeId(nodeId); - } - }; - // register node struct TEvInterconnect::TEvRegisterNode: public TEventBase<TEvInterconnect::TEvRegisterNode, TEvInterconnect::EvRegisterNode> { }; |