Skip to content

Commit 197c0e7

Browse files
committed
fix build
1 parent 01894b9 commit 197c0e7

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

ydb/core/kqp/runtime/kqp_compute_scheduler.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,17 @@ class TSchedulableComputeActorBase : public NYql::NDq::TDqSyncComputeActorBase<T
171171
}
172172

173173
void DoBoostrap() {
174-
TlsActivationContext->AsActorContext().Mailbox.EnableStats();
174+
if (!SelfHandle.Defined()) {
175+
return;
176+
}
177+
175178
OldActivationStats = TlsActivationContext->AsActorContext().Mailbox.GetElapsedCycles();
176-
Y_ABORT_UNLESS(OldActivationStats.has_value());
177-
if (*OldActivationStats > 0) {
178-
CA_LOG_E("strange leftover activation " << OldActivationStats);
179+
if (!OldActivationStats.has_value()) {
180+
TlsActivationContext->AsActorContext().Mailbox.EnableStats();
181+
OldActivationStats = TlsActivationContext->AsActorContext().Mailbox.GetElapsedCycles();
179182
}
183+
184+
Y_ABORT_UNLESS(OldActivationStats.has_value());
180185
}
181186

182187
private:
@@ -240,6 +245,10 @@ class TSchedulableComputeActorBase : public NYql::NDq::TDqSyncComputeActorBase<T
240245
}
241246

242247
void AccountActorSystemStats(NMonotonic::TMonotonic now) {
248+
if (!SelfHandle.Defined()) {
249+
return;
250+
}
251+
243252
auto newStats = TlsActivationContext->AsActorContext().Mailbox.GetElapsedCycles();
244253
Y_ABORT_UNLESS(OldActivationStats.has_value());
245254
Y_ABORT_UNLESS(newStats.has_value());

0 commit comments

Comments
 (0)