From d9565af381f1cda6f46bf52d812f69d4f59404af Mon Sep 17 00:00:00 2001 From: Nikolay Shestakov Date: Wed, 28 Aug 2024 12:14:24 +0500 Subject: [PATCH] Use UserPool for pqv0 actors (#8316) --- ydb/services/deprecated/persqueue_v0/grpc_pq_read.cpp | 8 ++++---- ydb/services/deprecated/persqueue_v0/grpc_pq_write.cpp | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ydb/services/deprecated/persqueue_v0/grpc_pq_read.cpp b/ydb/services/deprecated/persqueue_v0/grpc_pq_read.cpp index a8ca115db4d0..a2f9d1d34dd2 100644 --- a/ydb/services/deprecated/persqueue_v0/grpc_pq_read.cpp +++ b/ydb/services/deprecated/persqueue_v0/grpc_pq_read.cpp @@ -154,10 +154,10 @@ void TPQReadService::TSession::SendEvent(IEventBase* ev) { void TPQReadService::TSession::CreateActor(std::unique_ptr&& topicsHandler) { auto classifier = Proxy->GetClassifier(); - ActorId = Proxy->ActorSystem->Register( - new TReadSessionActor(this, *topicsHandler, Cookie, SchemeCache, NewSchemeCache, Counters, - classifier ? classifier->ClassifyAddress(GetPeerName()) - : "unknown")); + auto* actor = new TReadSessionActor(this, *topicsHandler, Cookie, SchemeCache, NewSchemeCache, Counters, + classifier ? classifier->ClassifyAddress(GetPeerName()) : "unknown"); + ui32 poolId = Proxy->ActorSystem->AppData<::NKikimr::TAppData>()->UserPoolId; + ActorId = Proxy->ActorSystem->Register(actor, TMailboxType::HTSwap, poolId); } diff --git a/ydb/services/deprecated/persqueue_v0/grpc_pq_write.cpp b/ydb/services/deprecated/persqueue_v0/grpc_pq_write.cpp index 3d5eb3b33a48..4d96d5f7aa6c 100644 --- a/ydb/services/deprecated/persqueue_v0/grpc_pq_write.cpp +++ b/ydb/services/deprecated/persqueue_v0/grpc_pq_write.cpp @@ -113,11 +113,10 @@ bool TPQWriteServiceImpl::TSession::CreateActor(const TString &localCluster) { } auto classifier = Proxy->GetClassifier(); - ActorId = Proxy->ActorSystem->Register( - new TWriteSessionActor(this, Cookie, SchemeCache, Counters, localCluster, - classifier ? classifier->ClassifyAddress(GetPeerName()) - : "unknown"), TMailboxType::Simple, 0 - ); + auto* actor = new TWriteSessionActor(this, Cookie, SchemeCache, Counters, localCluster, + classifier ? classifier->ClassifyAddress(GetPeerName()) : "unknown"); + ui32 poolId = Proxy->ActorSystem->AppData<::NKikimr::TAppData>()->UserPoolId; + ActorId = Proxy->ActorSystem->Register(actor, TMailboxType::HTSwap, poolId); return true; }