Skip to content

Commit bae9923

Browse files
authored
VERIFY that created ingress is not empty (#2233)
1 parent 35f59b7 commit bae9923

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ydb/core/blobstorage/vdisk/localrecovery/localrecovery_logreplay.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,10 @@ namespace NKikimr {
384384
const bool fromVPutCommand = true;
385385
const TLogoBlobID id = LogoBlobIDFromLogoBlobID(PutMsg.GetBlobID());
386386
const TString &buf = PutMsg.GetBuffer();
387-
TIngress ingress = *TIngress::CreateIngressWithLocal(LocRecCtx->VCtx->Top.get(), LocRecCtx->VCtx->ShortSelfVDisk, id);
387+
TMaybe<TIngress> ingress = TIngress::CreateIngressWithLocal(LocRecCtx->VCtx->Top.get(), LocRecCtx->VCtx->ShortSelfVDisk, id);
388+
Y_VERIFY_S(ingress, "Failed to create ingress, VDiskId# " << LocRecCtx->VCtx->ShortSelfVDisk << ", BlobId# " << id);
388389

389-
PutLogoBlobToHullAndSyncLog(ctx, record.Lsn, id, ingress, buf, fromVPutCommand);
390+
PutLogoBlobToHullAndSyncLog(ctx, record.Lsn, id, *ingress, buf, fromVPutCommand);
390391
return EDispatchStatus::Success;
391392
}
392393

@@ -396,10 +397,12 @@ namespace NKikimr {
396397
return EDispatchStatus::Error;
397398

398399
const bool fromVPutCommand = true;
399-
TIngress ingress = *TIngress::CreateIngressWithLocal(LocRecCtx->VCtx->Top.get(), LocRecCtx->VCtx->ShortSelfVDisk,
400+
TMaybe<TIngress> ingress = TIngress::CreateIngressWithLocal(LocRecCtx->VCtx->Top.get(), LocRecCtx->VCtx->ShortSelfVDisk,
400401
PutMsgOpt.Id);
402+
Y_VERIFY_S(ingress, "Failed to create ingress, VDiskId# " << LocRecCtx->VCtx->ShortSelfVDisk <<
403+
", BlobId# " << PutMsgOpt.Id);
401404

402-
PutLogoBlobToHullAndSyncLog(ctx, record.Lsn, PutMsgOpt.Id, ingress, PutMsgOpt.Data, fromVPutCommand);
405+
PutLogoBlobToHullAndSyncLog(ctx, record.Lsn, PutMsgOpt.Id, *ingress, PutMsgOpt.Data, fromVPutCommand);
403406
return EDispatchStatus::Success;
404407
}
405408

0 commit comments

Comments
 (0)