Skip to content

Commit 6694845

Browse files
authored
Make remaining group amount calculator consider decommission (merge from main #4942) (#4943)
1 parent e7f9bdd commit 6694845

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ydb/core/mind/bscontroller/storage_stats_calculator.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,17 @@ class TStorageStatsCoroCalculatorImpl : public TActorCoroImpl {
136136
const auto readCentric = pdisk.HasReadCentric() ? MakeMaybe(pdisk.GetReadCentric()) : Nothing();
137137
if (filter.MatchPDisk(pdisk.GetCategory(), sharedWithOs, readCentric)) {
138138
const TNodeLocation& location = HostRecordMap->GetLocation(pdiskId.NodeId);
139+
const bool usable = pdisk.GetDecommitStatus() == "DECOMMIT_NONE";
139140
const bool ok = mapper.RegisterPDisk({
140141
.PDiskId = pdiskId,
141142
.Location = location,
142-
.Usable = true,
143+
.Usable = usable,
143144
.NumSlots = pdisk.GetNumActiveSlots(),
144145
.MaxSlots = pdisk.GetExpectedSlotCount(),
145146
.Groups = {},
146147
.SpaceAvailable = 0,
147148
.Operational = true,
148-
.Decommitted = false,
149+
.Decommitted = false, // this flag applies only to group reconfiguration
149150
});
150151
Y_ABORT_UNLESS(ok);
151152
break;

0 commit comments

Comments
 (0)