Skip to content

Commit f9026a7

Browse files
authored
Merge 202f5a6 into 4b411f4
2 parents 4b411f4 + 202f5a6 commit f9026a7

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

ydb/core/blobstorage/nodewarden/node_warden_pdisk.cpp

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,12 @@ namespace NKikimr::NStorage {
326326
const TPDiskKey key(pdisk);
327327

328328
switch (entityStatus) {
329+
case NKikimrBlobStorage::RESTART:
330+
if (auto it = LocalPDisks.find({pdisk.GetNodeID(), pdisk.GetPDiskID()}); it != LocalPDisks.end()) {
331+
it->second.Record = pdisk;
332+
}
333+
DoRestartLocalPDisk(pdisk);
334+
[[fallthrough]];
329335
case NKikimrBlobStorage::INITIAL:
330336
case NKikimrBlobStorage::CREATE: {
331337
const auto [it, inserted] = pdiskMap.try_emplace(key, nullptr);
@@ -336,22 +342,8 @@ namespace NKikimr::NStorage {
336342
it->second->ClearEntityStatus();
337343
break;
338344
}
339-
340345
case NKikimrBlobStorage::DESTROY:
341-
if (const auto it = pdiskMap.find(key); it != pdiskMap.end()) {
342-
pdiskMap.erase(it);
343-
}
344-
break;
345-
346-
case NKikimrBlobStorage::RESTART:
347-
if (auto it = LocalPDisks.find({pdisk.GetNodeID(), pdisk.GetPDiskID()}); it != LocalPDisks.end()) {
348-
it->second.Record = pdisk;
349-
}
350-
if (auto it = pdiskMap.find(key); it != pdiskMap.end()) {
351-
it->second->CopyFrom(pdisk);
352-
it->second->ClearEntityStatus();
353-
}
354-
DoRestartLocalPDisk(pdisk);
346+
pdiskMap.erase(key);
355347
break;
356348
}
357349
}

0 commit comments

Comments
 (0)