Skip to content

Commit 6690e4b

Browse files
committed
better
1 parent 55c8dc3 commit 6690e4b

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

ydb/core/mind/hive/hive_ut.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -2828,6 +2828,25 @@ Y_UNIT_TEST_SUITE(THiveTest) {
28282828
tabletB = tablets[1];
28292829
}
28302830
}
2831+
2832+
// If assured space is not set, usage is always set to 1
2833+
auto groupMetricsExchange = MakeHolder<TEvBlobStorage::TEvControllerGroupMetricsExchange>();
2834+
for (const auto& [group, tablets] : groupToTablets) {
2835+
NKikimrBlobStorage::TGroupMetrics* metrics = groupMetricsExchange->Record.AddGroupMetrics();
2836+
2837+
metrics->SetGroupId(group);
2838+
metrics->MutableGroupParameters()->SetGroupID(group);
2839+
metrics->MutableGroupParameters()->SetStoragePoolName("def1");
2840+
metrics->MutableGroupParameters()->MutableAssuredResources()->SetSpace(300'000'000);
2841+
}
2842+
2843+
runtime.SendToPipe(MakeBSControllerID(0), sender, groupMetricsExchange.Release(), 0, GetPipeConfigWithRetries());
2844+
{
2845+
TDispatchOptions options;
2846+
options.FinalEvents.push_back(TDispatchOptions::TFinalEventCondition(TEvBlobStorage::EvControllerGroupMetricsExchange));
2847+
runtime.DispatchEvents(options);
2848+
}
2849+
28312850
TChannelsBindings channels = BINDED_CHANNELS;
28322851
for (auto& bind : channels) {
28332852
bind.SetSize(200'000'000);

ydb/core/mind/hive/tx__update_tablet_groups.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ class TTxUpdateTabletGroups : public TTransactionBase<THive> {
162162
fromGeneration = 0;
163163
} else if (channel->History.back().GroupID == group->GetGroupID()) {
164164
// We decided to keep the group the same
165-
// Do nothing, except set new timestamp
166-
channel->History.back().Timestamp = ctx.Now();
167165
continue;
168166
} else {
169167
needToIncreaseGeneration = true;

0 commit comments

Comments
 (0)