File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,9 @@ void TColumnShard::FillColumnTableStats(
338
338
std::unique_ptr<TEvDataShard::TEvPeriodicTableStats>& ev
339
339
) {
340
340
auto tables = TablesManager.GetTables ();
341
- TTableStatsBuilder tableStatsBuilder (Counters, Executor (), TablesManager.MutablePrimaryIndex ());
341
+ std::optional<TTableStatsBuilder> tableStatsBuilder =
342
+ TablesManager.HasPrimaryIndex () ? std::make_optional<TTableStatsBuilder>(Counters, Executor (), TablesManager.MutablePrimaryIndex ())
343
+ : std::nullopt;
342
344
343
345
LOG_S_DEBUG (" There are stats for " << tables.size () << " tables" );
344
346
for (const auto & [pathId, _] : tables) {
@@ -356,7 +358,9 @@ void TColumnShard::FillColumnTableStats(
356
358
resourceMetrics->Fill (*periodicTableStats->MutableTabletMetrics ());
357
359
}
358
360
359
- tableStatsBuilder.FillTableStats (pathId, *(periodicTableStats->MutableTableStats ()));
361
+ if (tableStatsBuilder) {
362
+ tableStatsBuilder->FillTableStats (pathId, *(periodicTableStats->MutableTableStats ()));
363
+ }
360
364
361
365
LOG_S_TRACE (" Add stats for table, tableLocalID=" << pathId);
362
366
}
You can’t perform that action at this time.
0 commit comments