From 8449b08fa5d16437b558d5a79b846dbf3ec0036d Mon Sep 17 00:00:00 2001 From: Sergey Belyakov Date: Mon, 26 Feb 2024 08:43:31 +0000 Subject: [PATCH] VERIFY on empty Ingress --- .../vdisk/localrecovery/localrecovery_logreplay.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ydb/core/blobstorage/vdisk/localrecovery/localrecovery_logreplay.cpp b/ydb/core/blobstorage/vdisk/localrecovery/localrecovery_logreplay.cpp index a8d4830e2c80..c4189d64eeef 100644 --- a/ydb/core/blobstorage/vdisk/localrecovery/localrecovery_logreplay.cpp +++ b/ydb/core/blobstorage/vdisk/localrecovery/localrecovery_logreplay.cpp @@ -384,9 +384,10 @@ namespace NKikimr { const bool fromVPutCommand = true; const TLogoBlobID id = LogoBlobIDFromLogoBlobID(PutMsg.GetBlobID()); const TString &buf = PutMsg.GetBuffer(); - TIngress ingress = *TIngress::CreateIngressWithLocal(LocRecCtx->VCtx->Top.get(), LocRecCtx->VCtx->ShortSelfVDisk, id); + TMaybe ingress = TIngress::CreateIngressWithLocal(LocRecCtx->VCtx->Top.get(), LocRecCtx->VCtx->ShortSelfVDisk, id); + Y_VERIFY_S(ingress, "Failed to create ingress, VDiskId# " << LocRecCtx->VCtx->ShortSelfVDisk << ", BlobId# " << id); - PutLogoBlobToHullAndSyncLog(ctx, record.Lsn, id, ingress, buf, fromVPutCommand); + PutLogoBlobToHullAndSyncLog(ctx, record.Lsn, id, *ingress, buf, fromVPutCommand); return EDispatchStatus::Success; } @@ -396,10 +397,12 @@ namespace NKikimr { return EDispatchStatus::Error; const bool fromVPutCommand = true; - TIngress ingress = *TIngress::CreateIngressWithLocal(LocRecCtx->VCtx->Top.get(), LocRecCtx->VCtx->ShortSelfVDisk, + TMaybe ingress = TIngress::CreateIngressWithLocal(LocRecCtx->VCtx->Top.get(), LocRecCtx->VCtx->ShortSelfVDisk, PutMsgOpt.Id); + Y_VERIFY_S(ingress, "Failed to create ingress, VDiskId# " << LocRecCtx->VCtx->ShortSelfVDisk << + ", BlobId# " << PutMsgOpt.Id); - PutLogoBlobToHullAndSyncLog(ctx, record.Lsn, PutMsgOpt.Id, ingress, PutMsgOpt.Data, fromVPutCommand); + PutLogoBlobToHullAndSyncLog(ctx, record.Lsn, PutMsgOpt.Id, *ingress, PutMsgOpt.Data, fromVPutCommand); return EDispatchStatus::Success; }