Skip to content

Commit 1e5c934

Browse files
alexvruydbot
authored andcommitted
Harden decommission checks for BlobDepot (#28216)
1 parent 78f7586 commit 1e5c934

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ydb/core/blobstorage/nodewarden/node_warden_group.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,14 @@ namespace NKikimr::NStorage {
115115
TGroupRecord& group = it->second;
116116
group.MaxKnownGeneration = Max(group.MaxKnownGeneration, generation);
117117
if (newGroup) {
118-
const auto erasure = static_cast<TBlobStorageGroupType::EErasureSpecies>(newGroup->GetErasureSpecies());
119-
Y_DEBUG_ABORT_UNLESS(!group.GType || group.GType->GetErasure() == erasure);
120-
group.GType.emplace(erasure);
118+
if (newGroup->HasErasureSpecies()) {
119+
const auto erasure = static_cast<TBlobStorageGroupType::EErasureSpecies>(newGroup->GetErasureSpecies());
120+
Y_DEBUG_ABORT_UNLESS(!group.GType || group.GType->GetErasure() == erasure);
121+
group.GType.emplace(erasure);
122+
} else {
123+
Y_ABORT_UNLESS(newGroup->RingsSize() == 0); // ensure no VDisks in group
124+
group.GType.emplace(TBlobStorageGroupType::ErasureNone);
125+
}
121126
}
122127

123128
// forget pending queries

0 commit comments

Comments
 (0)