Skip to content

Commit b62fed9

Browse files
authored
minor bugfixes in SchemeBoard subscriber and tests (#20262)
1 parent 9a3ba4f commit b62fed9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ydb/core/tx/scheme_board/populator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ class TPopulator: public TMonitorableActor<TPopulator> {
706706
}
707707

708708
it->second.AckTo = ev->Sender;
709-
it->second.PathAcks.emplace(std::make_pair(pathId, version), TVector<ui32>(GroupInfo->RingGroups.size()));
709+
it->second.PathAcks.emplace(std::make_pair(pathId, version), TVector<ui32>(GroupInfo->RingGroups.size(), 0));
710710

711711
Update(pathId, isDeletion, ev->Cookie);
712712

ydb/core/tx/scheme_board/subscriber.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ class TSubscriber: public TMonitorableActor<TDerived> {
769769
}
770770

771771
bool IsMajorityReached() const {
772-
TVector<ui32> responsesByGroup(ProxyGroups.size());
772+
TVector<ui32> responsesByGroup(ProxyGroups.size(), 0);
773773
for (const auto& [proxy, _] : InitialResponses) {
774774
if (const auto* groupIdx = ProxyToGroupMap.FindPtr(proxy)) {
775775
responsesByGroup[*groupIdx]++;
@@ -939,8 +939,8 @@ class TSubscriber: public TMonitorableActor<TDerived> {
939939
Y_ABORT_UNLESS(!ReceivedSync.contains(ev->Sender));
940940
ReceivedSync[ev->Sender] = ev->Get()->Record.GetPartial();
941941

942-
TVector<ui32> successesByGroup(ProxyGroups.size());
943-
TVector<ui32> failuresByGroup(ProxyGroups.size());
942+
TVector<ui32> successesByGroup(ProxyGroups.size(), 0);
943+
TVector<ui32> failuresByGroup(ProxyGroups.size(), 0);
944944
for (const auto& [proxy, partial] : ReceivedSync) {
945945
const auto* groupIdx = ProxyToGroupMap.FindPtr(proxy);
946946
if (!groupIdx) {

ydb/core/tx/scheme_board/subscriber_ut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void TSubscriberTest::NotifyDelete() {
105105

106106
Context->CreateSubscriber<TSchemeBoardEvents::TEvNotifyUpdate>(edge, "path");
107107

108-
for (size_t i = 0; i <= replicas.size() / 2 + 1; ++i) {
108+
for (size_t i = 0; i < replicas.size() / 2 + 1; ++i) {
109109
Context->Send(replicas[i], edge, GenerateUpdate(GenerateDescribe("path", TPathId(1, 1)), 1, 1, true));
110110
}
111111

0 commit comments

Comments
 (0)