@@ -92,7 +92,7 @@ class TTxStoreTableStats: public TTxStoreStats<TEvDataShard::TEvPeriodicTableSta
92
92
bool PersistSingleStats (const TPathId& pathId, const TStatsQueue<TEvDataShard::TEvPeriodicTableStats>::TItem& item, TTransactionContext& txc, const TActorContext& ctx) override ;
93
93
void ScheduleNextBatch (const TActorContext& ctx) override ;
94
94
95
- template <typename T>
95
+ template <typename T>
96
96
TPartitionStats PrepareStats (const TActorContext& ctx, const T& rec) const ;
97
97
};
98
98
@@ -124,10 +124,8 @@ THolder<TProposeRequest> MergeRequest(
124
124
return std::move (request);
125
125
}
126
126
127
- template <typename T>
128
- TPartitionStats TTxStoreTableStats::PrepareStats (
129
- const TActorContext& ctx, const T& rec) const {
130
-
127
+ template <typename T>
128
+ TPartitionStats TTxStoreTableStats::PrepareStats (const TActorContext& ctx, const T& rec) const {
131
129
const auto & tableStats = rec.GetTableStats ();
132
130
const auto & tabletMetrics = rec.GetTabletMetrics ();
133
131
@@ -182,8 +180,7 @@ TPartitionStats TTxStoreTableStats::PrepareStats(
182
180
return newStats;
183
181
}
184
182
185
- bool TTxStoreTableStats::PersistSingleStats (const TPathId& pathId,
186
- const TStatsQueueItem<TEvDataShard::TEvPeriodicTableStats>& item, NTabletFlatExecutor::TTransactionContext& txc, const TActorContext& ctx) {
183
+ bool TTxStoreTableStats::PersistSingleStats (const TPathId& pathId, const TStatsQueueItem<TEvDataShard::TEvPeriodicTableStats>& item, NTabletFlatExecutor::TTransactionContext& txc, const TActorContext& ctx) {
187
184
const auto & rec = item.Ev ->Get ()->Record ;
188
185
const auto datashardId = TTabletId (rec.GetDatashardId ());
189
186
@@ -208,9 +205,9 @@ bool TTxStoreTableStats::PersistSingleStats(const TPathId& pathId,
208
205
TShardIdx shardIdx = Self->TabletIdToShardIdx [datashardId];
209
206
210
207
LOG_DEBUG_S (ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
211
- " TTxStoreTableStats.PersistSingleStats: main stats from"
212
- << " datashardId(TabletID)=" << datashardId
213
- << " maps to shardIdx: " << shardIdx
208
+ " TTxStoreTableStats.PersistSingleStats: main stats from"
209
+ << " datashardId(TabletID)=" << datashardId
210
+ << " maps to shardIdx: " << shardIdx
214
211
<< " , pathId: " << pathId
215
212
<< " , pathId map=" << Self->PathsById [pathId]->Name
216
213
<< " , is column=" << isColumnTable
@@ -261,23 +258,20 @@ bool TTxStoreTableStats::PersistSingleStats(const TPathId& pathId,
261
258
updateSubdomainInfo = true ;
262
259
263
260
const auto tables = rec.GetTables ();
264
- LOG_DEBUG_S (ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
265
- " OLAP store contains " << tables.size () << " tables." );
261
+ LOG_DEBUG_S (ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, " OLAP store contains " << tables.size () << " tables." );
266
262
267
- for (const auto & table : tables) {
263
+ for (const auto & table : tables) {
268
264
const TPartitionStats newTableStats = PrepareStats (ctx, table);
269
265
270
266
const TPathId tablePathId = TPathId (TOwnerId (pathId.OwnerId ), TLocalPathId (table.GetTableLocalId ()));
271
267
272
268
if (Self->ColumnTables .contains (tablePathId)) {
273
- LOG_DEBUG_S (ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
274
- " add stats for exists table with pathId=" << tablePathId);
269
+ LOG_DEBUG_S (ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, " add stats for exists table with pathId=" << tablePathId);
275
270
276
271
auto columnTable = Self->ColumnTables .TakeVerified (tablePathId);
277
272
columnTable->UpdateTableStats (tablePathId, newTableStats);
278
273
} else {
279
- LOG_WARN_S (ctx, NKikimrServices::FLAT_TX_SCHEMESHARD,
280
- " failed add stats for table with pathId=" << tablePathId);
274
+ LOG_WARN_S (ctx, NKikimrServices::FLAT_TX_SCHEMESHARD, " failed add stats for table with pathId=" << tablePathId);
281
275
}
282
276
}
283
277
0 commit comments