Skip to content

Commit 67d74e2

Browse files
authored
fix crash inside AS when statistics is disabled (#10949)
1 parent fe19569 commit 67d74e2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ydb/core/tx/schemeshard/schemeshard_impl.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7389,6 +7389,9 @@ void TSchemeShard::Handle(TEvPrivate::TEvSendBaseStatsToSA::TPtr&, const TActorC
73897389
}
73907390

73917391
void TSchemeShard::InitializeStatistics(const TActorContext& ctx) {
7392+
if (!EnableStatistics) {
7393+
return;
7394+
}
73927395
ResolveSA();
73937396
ctx.Schedule(TDuration::Seconds(30), new TEvPrivate::TEvSendBaseStatsToSA());
73947397
}
@@ -7445,10 +7448,6 @@ void TSchemeShard::ConnectToSA() {
74457448
}
74467449

74477450
TDuration TSchemeShard::SendBaseStatsToSA() {
7448-
if (!EnableStatistics) {
7449-
return TDuration::Max();
7450-
}
7451-
74527451
if (!SAPipeClientId) {
74537452
ResolveSA();
74547453
if (!StatisticsAggregatorId) {

0 commit comments

Comments
 (0)