Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,28 @@ class TLogFlushCompletionAction : public TCompletionAction {
const ui32 EndChunkIdx;
const ui32 EndSectorIdx;
THolder<TLogWriter> &CommonLogger;
TCompletionAction* CompletionLogWrite;
public:
TLogFlushCompletionAction(ui32 endChunkIdx, ui32 endSectorIdx, THolder<TLogWriter> &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;
}
Expand Down
1 change: 1 addition & 0 deletions ydb/core/blobstorage/pdisk/blobstorage_pdisk_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ struct TOwnerData {
CurrentFirstLsnToKeep = 0;
LastWrittenCommitLsn = 0;
CutLogId = TActorId();
LogEndPosition = TLogEndPosition(0, 0);
WhiteboardProxyId = TActorId();
LogRecordsInitiallyRead = 0;
LogRecordsConsequentlyRead = 0;
Expand Down