Skip to content

Commit 0ba28e4

Browse files
kruallstanislav-shchetinin
authored andcommitted
Improve getting actorsystem [yql] (#14009)
1 parent b14cff4 commit 0ba28e4

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

ydb/library/yql/providers/dq/actors/yt/lock.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct TLockRequest: public TActor<TLockRequest> {
8383
if (result.IsOK()) {
8484
NYT::NApi::TLockNodeOptions options;
8585
options.Waitable = false;
86-
auto* actorSystem = ctx.ExecutorThread.ActorSystem;
86+
auto* actorSystem = ctx.ActorSystem();
8787
auto selfId = SelfId();
8888
try {
8989
YT_UNUSED_FUTURE(Transaction->LockNode("#" + ToString(result.ValueOrThrow()), NYT::NCypressClient::ELockMode::Exclusive, options).As<void>()
@@ -224,7 +224,7 @@ struct TLockRequest: public TActor<TLockRequest> {
224224
template<typename T>
225225
void Finish(const NYT::TErrorOr<T>& result, const TActorContext& ctx) {
226226
if (result.IsOK()) {
227-
auto* actorSystem = ctx.ExecutorThread.ActorSystem;
227+
auto* actorSystem = ctx.ActorSystem();
228228
auto selfId = SelfId();
229229
Transaction->SubscribeAborted(BIND([actorSystem, selfId](const NYT::TError& /*error*/) {
230230
actorSystem->Send(selfId, new TEvents::TEvPoison());
@@ -247,7 +247,7 @@ struct TLockRequest: public TActor<TLockRequest> {
247247
auto lockNode = Prefix + "/" + LockName + ".lock";
248248

249249
try {
250-
auto* actorSystem = ctx.ExecutorThread.ActorSystem;
250+
auto* actorSystem = ctx.ActorSystem();
251251
auto selfId = SelfId();
252252
YT_UNUSED_FUTURE(Transaction->CreateNode(
253253
lockNode,

ydb/library/yql/providers/dq/actors/yt/yt_wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ namespace NYql {
254254

255255
template<typename T>
256256
TWeakPtr<T> NewRequest(ui64 id, TActorId sender, const TActorContext& ctx) {
257-
auto req = New<T>(SelfId(), sender, ctx.ExecutorThread.ActorSystem, id);
257+
auto req = New<T>(SelfId(), sender, ctx.ActorSystem(), id);
258258
Requests.emplace(req);
259259
return NYT::MakeWeak(req);
260260
}

ydb/library/yql/providers/dq/global_worker_manager/service_node_pinger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ class TServiceNodePinger: public TActor<TServiceNodePinger> {
269269
req.AddKnownNodes(node);
270270
}
271271

272-
auto* actorSystem = ctx.ExecutorThread.ActorSystem;
272+
auto* actorSystem = ctx.ActorSystem();
273273
auto selfId = SelfId();
274274

275275
Resolver->GetConnection()

ydb/library/yql/providers/dq/service/grpc_service.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ namespace NYql::NDqs {
116116
YQL_LOG_CTX_ROOT_SESSION_SCOPE(TraceId);
117117
if (!CtxSubscribed) {
118118
auto selfId = ctx.SelfID;
119-
auto* actorSystem = ctx.ExecutorThread.ActorSystem;
119+
auto* actorSystem = ctx.ActorSystem();
120120
Ctx->GetFinishFuture().Subscribe([selfId, actorSystem](const NYdbGrpc::IRequestContextBase::TAsyncFinishResult& future) {
121121
Y_ABORT_UNLESS(future.HasValue());
122122
if (future.GetValue() == NYdbGrpc::IRequestContextBase::EFinishStatus::CANCEL) {

ydb/library/yql/providers/dq/task_runner_actor/task_runner_actor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ class TTaskRunnerActor
416416
i64 space,
417417
bool finish) override
418418
{
419-
auto* actorSystem = NActors::TlsActivationContext->ExecutorThread.ActorSystem;
419+
auto* actorSystem = NActors::TActivationContext::ActorSystem();
420420
auto selfId = SelfId();
421421

422422
YQL_ENSURE(!batch.IsWide());

ydb/library/yql/providers/dq/worker_manager/worker_manager_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TWorkerManagerCommon: public TRichActor<TDerived> {
1919
auto localRequest = MakeHolder<NActors::TEvInterconnect::TEvListNodes>();
2020

2121
auto replyTo = ev->Sender;
22-
auto* actorSystem = ctx.ExecutorThread.ActorSystem;
22+
auto* actorSystem = ctx.ActorSystem();
2323

2424
auto callback = MakeHolder<NActors::TActorFutureCallback<NActors::TEvInterconnect::TEvNodesInfo>>(
2525
[replyTo, actorSystem] (TAutoPtr<NActors::TEventHandle<NActors::TEvInterconnect::TEvNodesInfo>>& event) {

0 commit comments

Comments
 (0)