Skip to content

Commit dc41126

Browse files
authored
Merge bd897fb into 4c79b47
2 parents 4c79b47 + bd897fb commit dc41126

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

ydb/core/persqueue/read_balancer__balancing.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ void TPartitionFamily::AttachePartitions(const std::vector<ui32>& partitions, co
341341
}
342342

343343
auto [activePartitionCount, inactivePartitionCount] = ClassifyPartitions(newPartitions);
344-
ChangePartitionCounters(activePartitionCount, activePartitionCount);
344+
ChangePartitionCounters(activePartitionCount, inactivePartitionCount);
345345

346346
if (IsActive()) {
347347
if (!Session->AllPartitionsReadable(newPartitions)) {
@@ -734,7 +734,11 @@ bool TConsumer::BreakUpFamily(TPartitionFamily* family, ui32 partitionId, bool d
734734
f->Session->Families.try_emplace(f->Id, f);
735735
if (f->IsActive()) {
736736
++f->Session->ActiveFamilyCount;
737+
} else if (f->IsRelesing()) {
738+
++f->Session->ReleasingFamilyCount;
737739
}
740+
f->Session->ActivePartitionCount += f->ActivePartitionCount;
741+
f->Session->InactivePartitionCount += f->InactivePartitionCount;
738742
}
739743

740744
newFamilies.push_back(f);

ydb/core/persqueue/read_balancer__balancing_app.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ void TBalancer::RenderApp(TStringStream& str) const {
171171
TABLEH() { }
172172
TABLEH() { str << "Id"; }
173173
TABLEH() { str << "Partitions"; }
174-
TABLEH() { str << "<span alt=\"All / Active / Releasing\">Families</span>"; }
175-
TABLEH() { str << "<span alt=\"Active / Inactive / Releasing\">Statistics</span>"; };
174+
TABLEH() { str << "<span title=\"All families / Active / Releasing\">Families</span>"; }
175+
TABLEH() { str << "<span title=\"All partitions / Active / Inactive / Releasing\">Statistics</span>"; };
176176
TABLEH() { str << "Client node"; }
177177
TABLEH() { str << "Proxy node"; }
178178
}
@@ -203,7 +203,8 @@ void TBalancer::RenderApp(TStringStream& str) const {
203203
TABLED() { str << session->SessionName; }
204204
TABLED() { str << (session->Partitions.empty() ? "" : JoinRange(", ", session->Partitions.begin(), session->Partitions.end())); }
205205
TABLED() { str << session->Families.size() << " / " << session->ActiveFamilyCount << " / " << session->ReleasingFamilyCount; }
206-
TABLED() { str << session->ActivePartitionCount << " / " << session->InactivePartitionCount << " / " << session->ReleasingPartitionCount; }
206+
TABLED() { str << (session->ActivePartitionCount + session->InactivePartitionCount) << " / " << session->ActivePartitionCount
207+
<< " / " << session->InactivePartitionCount << " / " << session->ReleasingPartitionCount; }
207208
TABLED() { str << session->ClientNode; }
208209
TABLED() { str << session->ProxyNodeId; }
209210
}
@@ -213,7 +214,8 @@ void TBalancer::RenderApp(TStringStream& str) const {
213214
TABLED() { str << "<strong>Total:</strong>"; }
214215
TABLED() { }
215216
TABLED() { str << familyAllCount << " / " << activeFamilyCount << " / " << releasingFamilyCount; }
216-
TABLED() { str << activePartitionCount << " / " << inactivePartitionCount << " / " << releasingPartitionCount; }
217+
TABLED() { str << (activePartitionCount + inactivePartitionCount) << " / " << activePartitionCount << " / " << inactivePartitionCount
218+
<< " / " << releasingPartitionCount; }
217219
TABLED() { }
218220
TABLED() { }
219221
}

0 commit comments

Comments
 (0)