@@ -119,7 +119,7 @@ class TTableStatsCoroBuilder : public TActorCoroImpl, private IPages, TTableStat
119
119
120
120
ObtainResources ();
121
121
Spent->Alter (true ); // resume measurement
122
-
122
+
123
123
for (auto & loaded : msg->Pages ) {
124
124
partPages.emplace (pageId, TPinnedPageRef (loaded.Page ).GetData ());
125
125
PageRefs.emplace_back (std::move (loaded.Page ));
@@ -151,21 +151,21 @@ class TTableStatsCoroBuilder : public TActorCoroImpl, private IPages, TTableStat
151
151
152
152
BuildStats (*Subset, ev->Stats , RowCountResolution, DataSizeResolution, HistogramBucketsCount, this , [this ](){
153
153
const auto now = GetCycleCountFast ();
154
-
154
+
155
155
if (now > CoroutineDeadline) {
156
156
Spent->Alter (false ); // pause measurement
157
157
ReleaseResources ();
158
158
159
159
Send (new IEventHandle (EvResume, 0 , SelfActorId, {}, nullptr , 0 ));
160
- WaitForSpecificEvent ([](IEventHandle& ev) {
161
- return ev.Type == EvResume;
160
+ WaitForSpecificEvent ([](IEventHandle& ev) {
161
+ return ev.Type == EvResume;
162
162
}, &TTableStatsCoroBuilder::ProcessUnexpectedEvent);
163
163
164
164
ObtainResources ();
165
165
Spent->Alter (true ); // resume measurement
166
166
}
167
167
}, TStringBuilder () << " Building stats at datashard " << TabletId << " , for tableId " << TableId << " : " );
168
-
168
+
169
169
Y_DEBUG_ABORT_UNLESS (IndexSize == ev->Stats .IndexSize .Size );
170
170
171
171
LOG_INFO_S (GetActorContext (), NKikimrServices::TABLET_STATS_BUILDER, " Stats at datashard " << TabletId << " , for tableId " << TableId << " : "
@@ -174,14 +174,6 @@ class TTableStatsCoroBuilder : public TActorCoroImpl, private IPages, TTableStat
174
174
<< (ev->PartOwners .size () > 1 || ev->PartOwners .size () == 1 && *ev->PartOwners .begin () != TabletId ? " , with borrowed parts" : " " )
175
175
<< (ev->HasSchemaChanges ? " , with schema changes" : " " )
176
176
<< " , LoadedSize " << PagesSize << " , " << NFmt::Do (*Spent));
177
-
178
- if (const auto & stats = ev->Stats ; stats.DataSize .Size > 10_MB && stats.RowCount > 100
179
- && Min (stats.RowCountHistogram .size (), stats.DataSizeHistogram .size ()) < HistogramBucketsCount / 2 )
180
- {
181
- LOG_ERROR_S (GetActorContext (), NKikimrServices::TABLET_STATS_BUILDER, " Stats at datashard " << TabletId << " , for tableId " << TableId
182
- << " don't have enough keys: "
183
- << ev->Stats .ToString ());
184
- }
185
177
186
178
Send (ReplyTo, ev.Release ());
187
179
@@ -192,7 +184,7 @@ class TTableStatsCoroBuilder : public TActorCoroImpl, private IPages, TTableStat
192
184
switch (ev->GetTypeRewrite ()) {
193
185
case TEvResourceBroker::EvTaskOperationError: {
194
186
const auto * msg = ev->CastAsLocal <TEvResourceBroker::TEvTaskOperationError>();
195
- LOG_ERROR_S (GetActorContext (), NKikimrServices::TABLET_STATS_BUILDER, " Failed to allocate resource"
187
+ LOG_ERROR_S (GetActorContext (), NKikimrServices::TABLET_STATS_BUILDER, " Failed to allocate resource"
196
188
<< " error '" << msg->Status .Message << " '"
197
189
<< " at datashard " << TabletId << " , for tableId " << TableId);
198
190
throw TExTableStatsError (ECode::RESOURCE_ALLOCATION_FAILED, msg->Status .Message );
@@ -421,8 +413,8 @@ void TDataShard::Handle(TEvPrivate::TEvTableStatsError::TPtr& ev, const TActorCo
421
413
422
414
auto msg = ev->Get ();
423
415
424
- LOG_ERROR_S (ctx, NKikimrServices::TABLET_STATS_BUILDER, " Stats rebuilt error '" << msg->Message
425
- << " ', code: " << ui32 (msg->Code )
416
+ LOG_ERROR_S (ctx, NKikimrServices::TABLET_STATS_BUILDER, " Stats rebuilt error '" << msg->Message
417
+ << " ', code: " << ui32 (msg->Code )
426
418
<< " at datashard " << TabletID () << " , for tableId " << msg->TableId );
427
419
428
420
auto it = TableInfos.find (msg->TableId );
0 commit comments