@@ -137,11 +137,11 @@ namespace NKikimr::NStorage {
137
137
void TNodeWarden::StartLocalPDisk (const NKikimrBlobStorage::TNodeWardenServiceSet::TPDisk& pdisk, bool temporary) {
138
138
const TString& path = pdisk.GetPath ();
139
139
if (const auto it = PDiskByPath.find (path); it != PDiskByPath.end ()) {
140
+ Y_ABORT_UNLESS (!temporary);
140
141
const auto jt = LocalPDisks.find (it->second .RunningPDiskId );
141
142
Y_ABORT_UNLESS (jt != LocalPDisks.end ());
142
143
TPDiskRecord& record = jt->second ;
143
144
if (record.Temporary ) { // this is temporary PDisk spinning, have to wait for it to finish
144
- Y_ABORT_UNLESS (!temporary);
145
145
PDisksWaitingToStart.insert (pdisk.GetPDiskID ());
146
146
it->second .Pending = pdisk;
147
147
} else { // incorrect configuration: we are trying to start two different PDisks with the same path
@@ -220,14 +220,10 @@ namespace NKikimr::NStorage {
220
220
const TActorId actorId = MakeBlobStoragePDiskID (LocalNodeId, pdiskId);
221
221
TActivationContext::Send (new IEventHandle (TEvents::TSystem::Poison, 0 , actorId, {}, nullptr , 0 ));
222
222
Send (WhiteboardId, new NNodeWhiteboard::TEvWhiteboard::TEvPDiskStateDelete (pdiskId));
223
- if (const auto jt = PDiskByPath.find (it->second .Record .GetPath ()); jt != PDiskByPath.end () &&
224
- jt->second .RunningPDiskId == it->first ) {
225
- pending = std::move (jt->second .Pending );
226
- PDiskByPath.erase (jt);
227
- PDisksWaitingToStart.erase (pending->GetPDiskID ());
228
- } else {
229
- Y_DEBUG_ABORT (" missing entry in PDiskByPath" );
230
- }
223
+ const auto jt = PDiskByPath.find (it->second .Record .GetPath ());
224
+ Y_ABORT_UNLESS (jt != PDiskByPath.end () && jt->second .RunningPDiskId == it->first );
225
+ pending = std::move (jt->second .Pending );
226
+ PDiskByPath.erase (jt);
231
227
LocalPDisks.erase (it);
232
228
PDiskRestartInFlight.erase (pdiskId);
233
229
@@ -239,6 +235,7 @@ namespace NKikimr::NStorage {
239
235
}
240
236
241
237
if (pending) {
238
+ PDisksWaitingToStart.erase (pending->GetPDiskID ());
242
239
StartLocalPDisk (*pending, false );
243
240
244
241
// start VDisks over this one waiting for their turn
0 commit comments