@@ -769,7 +769,7 @@ void TPartition::Handle(TEvPQ::TEvPartitionStatus::TPtr& ev, const TActorContext
769
769
auto & userInfo = userInfoPair.second ;
770
770
if (!userInfo.LabeledCounters )
771
771
continue ;
772
- if (!userInfo.HasReadRule && !userInfo.Important )
772
+ if (userInfoPair. first != CLIENTID_WITHOUT_CONSUMER && !userInfo.HasReadRule && !userInfo.Important )
773
773
continue ;
774
774
auto * cac = ac->AddConsumerAggregatedCounters ();
775
775
cac->SetConsumer (userInfo.User );
@@ -1124,7 +1124,7 @@ bool TPartition::UpdateCounters(const TActorContext& ctx, bool force) {
1124
1124
auto & userInfo = userInfoPair.second ;
1125
1125
if (!userInfo.LabeledCounters )
1126
1126
continue ;
1127
- if (!userInfo.HasReadRule && !userInfo.Important )
1127
+ if (userInfoPair. first != CLIENTID_WITHOUT_CONSUMER && !userInfo.HasReadRule && !userInfo.Important )
1128
1128
continue ;
1129
1129
bool haveChanges = false ;
1130
1130
userInfo.EndOffset = EndOffset;
@@ -1228,6 +1228,12 @@ bool TPartition::UpdateCounters(const TActorContext& ctx, bool force) {
1228
1228
userInfo.LabeledCounters ->GetCounters ()[METRIC_READ_QUOTA_PER_CONSUMER_USAGE].Set (quotaUsage);
1229
1229
}
1230
1230
}
1231
+
1232
+ if (userInfoPair.first == CLIENTID_WITHOUT_CONSUMER ) {
1233
+ PartitionCountersLabeled->GetCounters ()[METRIC_READ_QUOTA_NO_CONSUMER_BYTES].Set (userInfo.LabeledCounters ->GetCounters ()[METRIC_READ_QUOTA_PER_CONSUMER_BYTES].Get ());
1234
+ PartitionCountersLabeled->GetCounters ()[METRIC_READ_QUOTA_NO_CONSUMER_USAGE].Set (userInfo.LabeledCounters ->GetCounters ()[METRIC_READ_QUOTA_PER_CONSUMER_USAGE].Get ());
1235
+ }
1236
+
1231
1237
if (haveChanges) {
1232
1238
ctx.Send (Tablet, new TEvPQ::TEvPartitionLabeledCounters (Partition, *userInfo.LabeledCounters ));
1233
1239
}
@@ -1339,6 +1345,14 @@ bool TPartition::UpdateCounters(const TActorContext& ctx, bool force) {
1339
1345
PartitionCountersLabeled->GetCounters ()[METRIC_READ_QUOTA_PARTITION_TOTAL_USAGE].Set (quotaUsage);
1340
1346
}
1341
1347
}
1348
+
1349
+ if (PartitionCountersLabeled->GetCounters ()[METRIC_READ_QUOTA_NO_CONSUMER_BYTES].Get ()) {
1350
+ ui64 quotaUsage = ui64 (AvgReadBytes.GetValue ()) * 1000000 / PartitionCountersLabeled->GetCounters ()[METRIC_READ_QUOTA_PARTITION_TOTAL_BYTES].Get () / 60 ;
1351
+ if (quotaUsage != PartitionCountersLabeled->GetCounters ()[METRIC_READ_QUOTA_PARTITION_TOTAL_USAGE].Get ()) {
1352
+ haveChanges = true ;
1353
+ PartitionCountersLabeled->GetCounters ()[METRIC_READ_QUOTA_PARTITION_TOTAL_USAGE].Set (quotaUsage);
1354
+ }
1355
+ }
1342
1356
return haveChanges;
1343
1357
}
1344
1358
@@ -1853,7 +1867,7 @@ void TPartition::OnProcessTxsAndUserActsWriteComplete(ui64 cookie, const TActorC
1853
1867
if (LastOffsetHasBeenCommited (userInfo)) {
1854
1868
SendReadingFinished (user);
1855
1869
}
1856
- } else {
1870
+ } else if (user != CLIENTID_WITHOUT_CONSUMER) {
1857
1871
auto ui = UsersInfoStorage->GetIfExists (user);
1858
1872
if (ui && ui->LabeledCounters ) {
1859
1873
ScheduleDropPartitionLabeledCounters (ui->LabeledCounters ->GetGroup ());
0 commit comments