diff options
author | hor911 <hor911@ydb.tech> | 2022-08-19 00:28:00 +0300 |
---|---|---|
committer | hor911 <hor911@ydb.tech> | 2022-08-19 00:28:00 +0300 |
commit | 29d668fad4b1b4ebcc8b4935be04ccb616ba81a7 (patch) | |
tree | fee1c64ac9a703197692a38539723f1447a1608c /library/cpp | |
parent | be2bb7b8834b39ffe7fdba646f380c229f273ced (diff) | |
download | ydb-29d668fad4b1b4ebcc8b4935be04ccb616ba81a7.tar.gz |
Library/cpp/actors Activities
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/actors/core/actor.h | 1 | ||||
-rw-r--r-- | library/cpp/actors/core/actor_coroutine.h | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/ask.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/executelater.h | 5 | ||||
-rw-r--r-- | library/cpp/actors/core/io_dispatcher.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/http/http_cache.cpp | 4 | ||||
-rw-r--r-- | library/cpp/actors/http/http_proxy.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/http/http_proxy_acceptor.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/http/http_proxy_incoming.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/http/http_proxy_outgoing.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/http/http_static.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/interconnect/handshake_broker.h | 2 | ||||
-rw-r--r-- | library/cpp/actors/interconnect/mock/ic_mock.cpp | 4 | ||||
-rw-r--r-- | library/cpp/actors/wilson/wilson_uploader.cpp | 2 |
14 files changed, 30 insertions, 4 deletions
diff --git a/library/cpp/actors/core/actor.h b/library/cpp/actors/core/actor.h index 02cb48fec9..612d2f655b 100644 --- a/library/cpp/actors/core/actor.h +++ b/library/cpp/actors/core/actor.h @@ -246,6 +246,7 @@ namespace NActors { NAMESERVICE = 450, DNS_RESOLVER = 481, INTERCONNECT_PROXY_WRAPPER = 546, + ACTOR_COROUTINE = 577 }; using EActivityType = EActorActivity; diff --git a/library/cpp/actors/core/actor_coroutine.h b/library/cpp/actors/core/actor_coroutine.h index 6bcb768eaf..a2e2863c91 100644 --- a/library/cpp/actors/core/actor_coroutine.h +++ b/library/cpp/actors/core/actor_coroutine.h @@ -154,7 +154,7 @@ namespace NActors { THolder<TActorCoroImpl> Impl; public: - TActorCoro(THolder<TActorCoroImpl> impl, ui32 activityType = IActor::ACTORLIB_COMMON) + TActorCoro(THolder<TActorCoroImpl> impl, ui32 activityType = IActor::ACTOR_COROUTINE) : IActor(static_cast<TReceiveFunc>(&TActorCoro::StateFunc), activityType) , Impl(std::move(impl)) {} diff --git a/library/cpp/actors/core/ask.cpp b/library/cpp/actors/core/ask.cpp index 0054c9a906..821c7606d4 100644 --- a/library/cpp/actors/core/ask.cpp +++ b/library/cpp/actors/core/ask.cpp @@ -31,6 +31,8 @@ namespace NActors { { } + static constexpr char ActorName[] = "ASK_ACTOR"; + public: void Bootstrap() { Send(Recipient_, std::move(Event_)); diff --git a/library/cpp/actors/core/executelater.h b/library/cpp/actors/core/executelater.h index e7a13c1005..1d5b5fa5a9 100644 --- a/library/cpp/actors/core/executelater.h +++ b/library/cpp/actors/core/executelater.h @@ -8,9 +8,8 @@ namespace NActors { template <typename TCallback> class TExecuteLater: public TActorBootstrapped<TExecuteLater<TCallback>> { public: - static constexpr IActor::EActivityType ActorActivityType() { - return IActor::ACTORLIB_COMMON; - } + + static constexpr char ActorName[] = "AS_EXECUTE_LATER"; TExecuteLater( TCallback&& callback, diff --git a/library/cpp/actors/core/io_dispatcher.cpp b/library/cpp/actors/core/io_dispatcher.cpp index 90699ff16c..6bd753f2e0 100644 --- a/library/cpp/actors/core/io_dispatcher.cpp +++ b/library/cpp/actors/core/io_dispatcher.cpp @@ -173,6 +173,8 @@ namespace NActors { TaskQueue.Stop(); } + static constexpr char ActorName[] = "IO_DISPATCHER_ACTOR"; + void Bootstrap() { while (NumRunningThreads < MinThreadCount) { StartThread(); diff --git a/library/cpp/actors/http/http_cache.cpp b/library/cpp/actors/http/http_cache.cpp index 73f6834a3d..343c5203ed 100644 --- a/library/cpp/actors/http/http_cache.cpp +++ b/library/cpp/actors/http/http_cache.cpp @@ -87,6 +87,8 @@ public: , GetCachePolicy(std::move(getCachePolicy)) {} + static constexpr char ActorName[] = "HTTP_OUT_CACHE_ACTOR"; + void Bootstrap(const NActors::TActorContext&) { // Become(&THttpOutgoingCacheActor::StateWork, RefreshTimeout, new NActors::TEvents::TEvWakeup()); @@ -339,6 +341,8 @@ public: , GetCachePolicy(std::move(getCachePolicy)) {} + static constexpr char ActorName[] = "HTTP_IN_CACHE_ACTOR"; + void Bootstrap(const NActors::TActorContext&) { // Become(&THttpIncomingCacheActor::StateWork, RefreshTimeout, new NActors::TEvents::TEvWakeup()); diff --git a/library/cpp/actors/http/http_proxy.cpp b/library/cpp/actors/http/http_proxy.cpp index 7cf83d38d8..0fbdb6d488 100644 --- a/library/cpp/actors/http/http_proxy.cpp +++ b/library/cpp/actors/http/http_proxy.cpp @@ -30,6 +30,8 @@ public: : Registry(std::move(registry)) {} + static constexpr char ActorName[] = "HTTP_PROXY_ACTOR"; + protected: STFUNC(StateWork) { switch (ev->GetTypeRewrite()) { diff --git a/library/cpp/actors/http/http_proxy_acceptor.cpp b/library/cpp/actors/http/http_proxy_acceptor.cpp index c44921fe0c..643f3ce7bf 100644 --- a/library/cpp/actors/http/http_proxy_acceptor.cpp +++ b/library/cpp/actors/http/http_proxy_acceptor.cpp @@ -28,6 +28,8 @@ public: #endif } + static constexpr char ActorName[] = "HTTP_ACCEPTOR_ACTOR"; + protected: STFUNC(StateListening) { switch (ev->GetTypeRewrite()) { diff --git a/library/cpp/actors/http/http_proxy_incoming.cpp b/library/cpp/actors/http/http_proxy_incoming.cpp index 9d5673170b..3dd06d9bfc 100644 --- a/library/cpp/actors/http/http_proxy_incoming.cpp +++ b/library/cpp/actors/http/http_proxy_incoming.cpp @@ -41,6 +41,8 @@ public: TSocketImpl::SetNonBlock(); } + static constexpr char ActorName[] = "IN_CONNECTION_ACTOR"; + void CleanupRequest(THttpIncomingRequestPtr& request) { if (RecycleRequests) { request->Clear(); diff --git a/library/cpp/actors/http/http_proxy_outgoing.cpp b/library/cpp/actors/http/http_proxy_outgoing.cpp index 8866773016..0f1ecf34ea 100644 --- a/library/cpp/actors/http/http_proxy_outgoing.cpp +++ b/library/cpp/actors/http/http_proxy_outgoing.cpp @@ -27,6 +27,8 @@ public: { } + static constexpr char ActorName[] = "OUT_CONNECTION_ACTOR"; + void Die(const NActors::TActorContext& ctx) override { ctx.Send(Owner, new TEvHttpProxy::TEvHttpConnectionClosed(ctx.SelfID)); TSocketImpl::Shutdown(); // to avoid errors when connection already closed diff --git a/library/cpp/actors/http/http_static.cpp b/library/cpp/actors/http/http_static.cpp index c075c5f693..ff36f5486d 100644 --- a/library/cpp/actors/http/http_static.cpp +++ b/library/cpp/actors/http/http_static.cpp @@ -26,6 +26,8 @@ public: , Index(index) {} + static constexpr char ActorName[] = "HTTP_STATIC_ACTOR"; + static TInstant GetCompileTime() { tm compileTime; strptime(__DATE__ " " __TIME__, "%B %d %Y %H:%M:%S", &compileTime); diff --git a/library/cpp/actors/interconnect/handshake_broker.h b/library/cpp/actors/interconnect/handshake_broker.h index 2c1ba01390..70a7cb91dc 100644 --- a/library/cpp/actors/interconnect/handshake_broker.h +++ b/library/cpp/actors/interconnect/handshake_broker.h @@ -46,6 +46,8 @@ namespace NActors { { } + static constexpr char ActorName[] = "HANDSHAKE_BROKER_ACTOR"; + STFUNC(StateFunc) { Y_UNUSED(ctx); switch(ev->GetTypeRewrite()) { diff --git a/library/cpp/actors/interconnect/mock/ic_mock.cpp b/library/cpp/actors/interconnect/mock/ic_mock.cpp index 54d919b650..fb96a7f2ea 100644 --- a/library/cpp/actors/interconnect/mock/ic_mock.cpp +++ b/library/cpp/actors/interconnect/mock/ic_mock.cpp @@ -110,6 +110,8 @@ namespace NActors { , SessionId(sessionId) {} + static constexpr char ActorName[] = "SESSION_MOCK_ACTOR"; + void Terminate() { for (auto&& ev : std::exchange(Queue, {})) { TActivationContext::Send(ev->ForwardOnNondelivery(TEvents::TEvUndelivered::Disconnected)); @@ -272,6 +274,8 @@ namespace NActors { , Common(std::move(common)) {} + static constexpr char ActorName[] = "PROXY_MOCK_ACTOR"; + void Registered(TActorSystem *as, const TActorId& parent) override { TActor::Registered(as, parent); State.Attach(NodeId, as, SelfId()); diff --git a/library/cpp/actors/wilson/wilson_uploader.cpp b/library/cpp/actors/wilson/wilson_uploader.cpp index 57e7dceee9..e17f202464 100644 --- a/library/cpp/actors/wilson/wilson_uploader.cpp +++ b/library/cpp/actors/wilson/wilson_uploader.cpp @@ -53,6 +53,8 @@ namespace NWilson { CQ.Shutdown(); } + static constexpr char ActorName[] = "WILSON_UPLOADER_ACTOR"; + void Bootstrap() { Become(&TThis::StateFunc); |