aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect
diff options
context:
space:
mode:
authorVladislav Kuznetsov <va.kuznecov@physics.msu.ru>2022-02-10 16:46:54 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:54 +0300
commit3cbae1ba94bff7a82ee848c3e9b2cebd96a69dd5 (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/actors/interconnect
parentde20f5598f0832a6e646f61b4feca942c00da928 (diff)
downloadydb-3cbae1ba94bff7a82ee848c3e9b2cebd96a69dd5.tar.gz
Restoring authorship annotation for Vladislav Kuznetsov <va.kuznecov@physics.msu.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/actors/interconnect')
-rw-r--r--library/cpp/actors/interconnect/events_local.h116
-rw-r--r--library/cpp/actors/interconnect/poller_actor.h8
-rw-r--r--library/cpp/actors/interconnect/ya.make2
3 files changed, 63 insertions, 63 deletions
diff --git a/library/cpp/actors/interconnect/events_local.h b/library/cpp/actors/interconnect/events_local.h
index fa1054be14..8a46ffd535 100644
--- a/library/cpp/actors/interconnect/events_local.h
+++ b/library/cpp/actors/interconnect/events_local.h
@@ -1,27 +1,27 @@
-#pragma once
-
+#pragma once
+
#include <library/cpp/actors/core/events.h>
#include <library/cpp/actors/core/event_local.h>
#include <library/cpp/actors/protos/interconnect.pb.h>
-#include <util/generic/deque.h>
-#include <util/network/address.h>
-
-#include "interconnect_stream.h"
-#include "packet.h"
+#include <util/generic/deque.h>
+#include <util/network/address.h>
+
+#include "interconnect_stream.h"
+#include "packet.h"
#include "types.h"
-
-namespace NActors {
+
+namespace NActors {
struct TProgramInfo {
ui64 PID = 0;
ui64 StartTime = 0;
ui64 Serial = 0;
};
-
+
enum class ENetwork : ui32 {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// local messages
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
+
Start = EventSpaceBegin(TEvents::ES_INTERCONNECT_TCP),
SocketReadyRead = Start,
@@ -71,11 +71,11 @@ namespace NActors {
struct TEvSocketReadyRead: public TEventLocal<TEvSocketReadyRead, ui32(ENetwork::SocketReadyRead)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvSocketReadyRead, "Network: TEvSocketReadyRead")
};
-
+
struct TEvSocketReadyWrite: public TEventLocal<TEvSocketReadyWrite, ui32(ENetwork::SocketReadyWrite)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvSocketReadyWrite, "Network: TEvSocketReadyWrite")
};
-
+
struct TEvSocketError: public TEventLocal<TEvSocketError, ui32(ENetwork::SocketError)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvSocketError, ::strerror(Error))
TString GetReason() const {
@@ -83,18 +83,18 @@ namespace NActors {
}
const int Error;
TIntrusivePtr<NInterconnect::TStreamSocket> Socket;
-
+
TEvSocketError(int error, TIntrusivePtr<NInterconnect::TStreamSocket> sock)
: Error(error)
, Socket(std::move(sock))
{
}
};
-
+
struct TEvSocketConnect: public TEventLocal<TEvSocketConnect, ui32(ENetwork::Connect)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvSocketConnect, "Network: TEvSocketConnect")
};
-
+
struct TEvSocketDisconnect: public TEventLocal<TEvSocketDisconnect, ui32(ENetwork::Disconnect)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvSocketDisconnect, "Network: TEvSocketDisconnect")
TDisconnectReason Reason;
@@ -104,7 +104,7 @@ namespace NActors {
{
}
};
-
+
struct TEvHandshakeAsk: public TEventLocal<TEvHandshakeAsk, ui32(ENetwork::HandshakeAsk)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeAsk, "Network: TEvHandshakeAsk")
TEvHandshakeAsk(const TActorId& self,
@@ -119,21 +119,21 @@ namespace NActors {
const TActorId Peer;
const ui64 Counter;
};
-
+
struct TEvHandshakeAck: public TEventLocal<TEvHandshakeAck, ui32(ENetwork::HandshakeAck)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeAck, "Network: TEvHandshakeAck")
-
+
TEvHandshakeAck(const TActorId& self, ui64 nextPacket, TSessionParams params)
: Self(self)
, NextPacket(nextPacket)
, Params(std::move(params))
{}
-
+
const TActorId Self;
const ui64 NextPacket;
const TSessionParams Params;
};
-
+
struct TEvHandshakeNak : TEventLocal<TEvHandshakeNak, ui32(ENetwork::HandshakeNak)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvSocketReadyRead, "Network: TEvHandshakeNak")
};
@@ -143,32 +143,32 @@ namespace NActors {
ui32(ENetwork::HandshakeRequest)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeRequest,
"Network: TEvHandshakeRequest")
-
+
NActorsInterconnect::THandshakeRequest Record;
};
-
+
struct TEvHandshakeReplyOK
: public TEventLocal<TEvHandshakeReplyOK,
ui32(ENetwork::HandshakeReplyOK)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeReplyOK,
"Network: TEvHandshakeReplyOK")
-
+
NActorsInterconnect::THandshakeReply Record;
};
-
+
struct TEvHandshakeReplyError
: public TEventLocal<TEvHandshakeReplyError,
ui32(ENetwork::HandshakeReplyError)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeReplyError,
"Network: TEvHandshakeReplyError")
-
+
TEvHandshakeReplyError(TString error) {
Record.SetErrorExplaination(error);
}
-
+
NActorsInterconnect::THandshakeReply Record;
};
-
+
struct TEvIncomingConnection: public TEventLocal<TEvIncomingConnection, ui32(ENetwork::IncomingConnection)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvIncomingConnection, "Network: TEvIncomingConnection")
TIntrusivePtr<NInterconnect::TStreamSocket> Socket;
@@ -179,10 +179,10 @@ namespace NActors {
, Address(std::move(address))
{}
};
-
+
struct TEvHandshakeDone: public TEventLocal<TEvHandshakeDone, ui32(ENetwork::HandshakeDone)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeDone, "Network: TEvHandshakeDone")
-
+
TEvHandshakeDone(
TIntrusivePtr<NInterconnect::TStreamSocket> socket,
const TActorId& peer,
@@ -198,7 +198,7 @@ namespace NActors {
, Params(std::move(params))
{
}
-
+
TIntrusivePtr<NInterconnect::TStreamSocket> Socket;
const TActorId Peer;
const TActorId Self;
@@ -206,10 +206,10 @@ namespace NActors {
TAutoPtr<TProgramInfo> ProgramInfo;
const TSessionParams Params;
};
-
+
struct TEvHandshakeFail: public TEventLocal<TEvHandshakeFail, ui32(ENetwork::HandshakeFail)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHandshakeFail, "Network: TEvHandshakeFail")
-
+
enum EnumHandshakeFail {
HANDSHAKE_FAIL_TRANSIENT,
HANDSHAKE_FAIL_PERMANENT,
@@ -224,58 +224,58 @@ namespace NActors {
const EnumHandshakeFail Temporary;
const TString Explanation;
- };
-
+ };
+
struct TEvKick: public TEventLocal<TEvKick, ui32(ENetwork::Kick)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvKick, "Network: TEvKick")
};
-
+
struct TEvFlush: public TEventLocal<TEvFlush, ui32(ENetwork::Flush)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvFlush, "Network: TEvFlush")
};
-
+
struct TEvLocalNodeInfo
: public TEventLocal<TEvLocalNodeInfo, ui32(ENetwork::NodeInfo)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvLocalNodeInfo, "Network: TEvLocalNodeInfo")
-
+
ui32 NodeId;
NAddr::IRemoteAddrPtr Address;
};
-
+
struct TEvBunchOfEventsToDestroy : TEventLocal<TEvBunchOfEventsToDestroy, ui32(ENetwork::BunchOfEventsToDestroy)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvBunchOfEventsToDestroy,
"Network: TEvBunchOfEventsToDestroy")
-
+
TEvBunchOfEventsToDestroy(TDeque<TAutoPtr<IEventBase>> events)
: Events(std::move(events))
{
}
-
+
TDeque<TAutoPtr<IEventBase>> Events;
};
-
+
struct TEvResolveAddress
: public TEventLocal<TEvResolveAddress, ui32(ENetwork::ResolveAddress)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvResolveAddress, "Network: TEvResolveAddress")
-
+
TString Address;
ui16 Port;
};
-
+
struct TEvAddressInfo
: public TEventLocal<TEvAddressInfo, ui32(ENetwork::AddressInfo)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvAddressInfo, "Network: TEvAddressInfo")
-
+
NAddr::IRemoteAddrPtr Address;
};
-
+
struct TEvResolveError
: public TEventLocal<TEvResolveError, ui32(ENetwork::ResolveError)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvResolveError, "Network: TEvResolveError")
-
+
TString Explain;
};
-
+
struct TEvHTTPStreamStatus
: public TEventLocal<TEvHTTPStreamStatus, ui32(ENetwork::HTTPStreamStatus)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHTTPStreamStatus,
@@ -285,38 +285,38 @@ namespace NActors {
COMPLETE,
ERROR,
};
-
+
EStatus Status;
TString Error;
TString HttpHeaders;
- };
-
+ };
+
struct TEvHTTPSendContent
: public TEventLocal<TEvHTTPSendContent, ui32(ENetwork::HTTPSendContent)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHTTPSendContent, "Network: TEvHTTPSendContent")
-
+
const char* Data;
size_t Len;
bool Last;
};
-
+
struct TEvConnectWakeup
: public TEventLocal<TEvConnectWakeup,
ui32(ENetwork::ConnectProtocolWakeup)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvConnectWakeup, "Protocols: TEvConnectWakeup")
};
-
+
struct TEvHTTPProtocolRetry
: public TEventLocal<TEvHTTPProtocolRetry,
ui32(ENetwork::HTTPProtocolRetry)> {
DEFINE_SIMPLE_LOCAL_EVENT(TEvHTTPProtocolRetry,
"Protocols: TEvHTTPProtocolRetry")
};
-
+
struct TEvLoadMessage
: TEventPB<TEvLoadMessage, NActorsInterconnect::TEvLoadMessage, static_cast<ui32>(ENetwork::EvLoadMessage)> {
TEvLoadMessage() = default;
-
+
template <typename TContainer>
TEvLoadMessage(const TContainer& route, const TString& id, const TString* payload) {
for (const TActorId& actorId : route) {
@@ -329,7 +329,7 @@ namespace NActors {
if (payload) {
Record.SetPayload(*payload);
}
- }
+ }
template <typename TContainer>
TEvLoadMessage(const TContainer& route, const TString& id, TRope&& payload) {
@@ -343,7 +343,7 @@ namespace NActors {
AddPayload(std::move(payload));
}
};
-
+
struct TEvUpdateFromInputSession : TEventLocal<TEvUpdateFromInputSession, static_cast<ui32>(ENetwork::EvUpdateFromInputSession)> {
ui64 ConfirmedByInput; // latest Confirm value from processed input packet
ui64 NumDataBytes;
diff --git a/library/cpp/actors/interconnect/poller_actor.h b/library/cpp/actors/interconnect/poller_actor.h
index dd787518e5..f927b82089 100644
--- a/library/cpp/actors/interconnect/poller_actor.h
+++ b/library/cpp/actors/interconnect/poller_actor.h
@@ -1,6 +1,6 @@
#pragma once
-#include "events_local.h"
+#include "events_local.h"
#include "poller.h"
#include <library/cpp/actors/core/actor.h>
@@ -56,8 +56,8 @@ namespace NActors {
IActor* CreatePollerActor();
inline TActorId MakePollerActorId() {
- char x[12] = {'I', 'C', 'P', 'o', 'l', 'l', 'e', 'r', '\xDE', '\xAD', '\xBE', '\xEF'};
+ char x[12] = {'I', 'C', 'P', 'o', 'l', 'l', 'e', 'r', '\xDE', '\xAD', '\xBE', '\xEF'};
return TActorId(0, TStringBuf(std::begin(x), std::end(x)));
- }
-
+ }
+
}
diff --git a/library/cpp/actors/interconnect/ya.make b/library/cpp/actors/interconnect/ya.make
index d6d9c3d8da..60d29b0fc0 100644
--- a/library/cpp/actors/interconnect/ya.make
+++ b/library/cpp/actors/interconnect/ya.make
@@ -16,7 +16,7 @@ SRCS(
channel_scheduler.h
event_filter.h
event_holder_pool.h
- events_local.h
+ events_local.h
interconnect_address.cpp
interconnect_address.h
interconnect_channel.cpp