@@ -261,10 +261,11 @@ class TBlobStorageController::TTxLoadEverything : public TTransactionBase<TBlobS
261
261
}
262
262
}
263
263
264
- for (const auto & [serial, info] : Self->DrivesSerials ) {
265
- if (info->NodeId && info->PDiskId && info->LifeStage == NKikimrBlobStorage::TDriveLifeStage::ADDED_BY_DSTOOL) {
266
- const bool inserted = driveToBox.emplace (std::make_tuple (*info->NodeId , serial.Serial ), info->BoxId ).second ;
267
- Y_VERIFY (inserted, " duplicate Serial-generated drive" );
264
+ for (const auto & [_, info] : Self->DrivesSerials ) {
265
+ if (info->LifeStage == NKikimrBlobStorage::TDriveLifeStage::ADDED_BY_DSTOOL) {
266
+ Y_VERIFY (info->NodeId );
267
+ Y_VERIFY (info->Path );
268
+ driveToBox.emplace (std::make_tuple (*info->NodeId , *info->Path ), info->BoxId );
268
269
}
269
270
}
270
271
@@ -288,9 +289,7 @@ class TBlobStorageController::TTxLoadEverything : public TTransactionBase<TBlobS
288
289
THostId hostId;
289
290
TBoxId boxId;
290
291
TString path = disks.GetValue <T::Path>();
291
- TString pathOrSerial = path ? path : disks.GetValue <T::ExpectedSerial>();
292
- Y_VERIFY_S (pathOrSerial, " For pdiskId# " << disks.GetValue <T::PDiskID>()
293
- << " not found neither pathOrSerial nor serial" );
292
+ Y_VERIFY_S (path, " Couldn't find path for pdiskId# " << disks.GetValue <T::PDiskID>());
294
293
295
294
if (const auto & x = Self->HostRecords ->GetHostId (disks.GetValue <T::NodeID>())) {
296
295
hostId = *x;
@@ -299,7 +298,7 @@ class TBlobStorageController::TTxLoadEverything : public TTransactionBase<TBlobS
299
298
}
300
299
301
300
// find the owning box
302
- if (const auto it = driveToBox.find (std::make_tuple (disks.GetValue <T::NodeID>(), pathOrSerial )); it != driveToBox.end ()) {
301
+ if (const auto it = driveToBox.find (std::make_tuple (disks.GetValue <T::NodeID>(), path )); it != driveToBox.end ()) {
303
302
boxId = it->second ;
304
303
driveToBox.erase (it);
305
304
} else {
0 commit comments