diff --git a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl_log.cpp b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl_log.cpp index dfa78979f08b..44d5bb98a11c 100644 --- a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl_log.cpp +++ b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl_log.cpp @@ -13,27 +13,28 @@ class TLogFlushCompletionAction : public TCompletionAction { const ui32 EndChunkIdx; const ui32 EndSectorIdx; THolder &CommonLogger; + TCompletionAction* CompletionLogWrite; public: TLogFlushCompletionAction(ui32 endChunkIdx, ui32 endSectorIdx, THolder &commonLogger, TCompletionAction* completionLogWrite) : EndChunkIdx(endChunkIdx) , EndSectorIdx(endSectorIdx) - , CommonLogger(commonLogger) { - this->FlushAction = completionLogWrite; - } + , CommonLogger(commonLogger) + , CompletionLogWrite(completionLogWrite) { } void Exec(TActorSystem *actorSystem) override { CommonLogger->FirstUncommitted = TFirstUncommitted(EndChunkIdx, EndSectorIdx); - - Y_DEBUG_ABORT_UNLESS(FlushAction); - - // FlushAction here is a TCompletionLogWrite which will decrease owner's inflight count. - FlushAction->Exec(actorSystem); + + CompletionLogWrite->SetResult(Result); + CompletionLogWrite->SetErrorReason(ErrorReason); + CompletionLogWrite->Exec(actorSystem); delete this; } void Release(TActorSystem *actorSystem) override { - FlushAction->Release(actorSystem); + CompletionLogWrite->SetResult(Result); + CompletionLogWrite->SetErrorReason(ErrorReason); + CompletionLogWrite->Release(actorSystem); delete this; } diff --git a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_state.h b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_state.h index 5dc1eba7a6c4..641ca889adef 100644 --- a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_state.h +++ b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_state.h @@ -196,6 +196,7 @@ struct TOwnerData { CurrentFirstLsnToKeep = 0; LastWrittenCommitLsn = 0; CutLogId = TActorId(); + LogEndPosition = TLogEndPosition(0, 0); WhiteboardProxyId = TActorId(); LogRecordsInitiallyRead = 0; LogRecordsConsequentlyRead = 0;