@@ -13,27 +13,28 @@ class TLogFlushCompletionAction : public TCompletionAction {
13
13
const ui32 EndChunkIdx;
14
14
const ui32 EndSectorIdx;
15
15
THolder<TLogWriter> &CommonLogger;
16
+ TCompletionAction* CompletionLogWrite;
16
17
public:
17
18
TLogFlushCompletionAction (ui32 endChunkIdx, ui32 endSectorIdx, THolder<TLogWriter> &commonLogger, TCompletionAction* completionLogWrite)
18
19
: EndChunkIdx(endChunkIdx)
19
20
, EndSectorIdx(endSectorIdx)
20
- , CommonLogger(commonLogger) {
21
- this ->FlushAction = completionLogWrite;
22
- }
21
+ , CommonLogger(commonLogger)
22
+ , CompletionLogWrite(completionLogWrite) { }
23
23
24
24
void Exec (TActorSystem *actorSystem) override {
25
25
CommonLogger->FirstUncommitted = TFirstUncommitted (EndChunkIdx, EndSectorIdx);
26
-
27
- Y_DEBUG_ABORT_UNLESS (FlushAction);
28
-
29
- // FlushAction here is a TCompletionLogWrite which will decrease owner's inflight count.
30
- FlushAction->Exec (actorSystem);
26
+
27
+ CompletionLogWrite->SetResult (Result);
28
+ CompletionLogWrite->SetErrorReason (ErrorReason);
29
+ CompletionLogWrite->Exec (actorSystem);
31
30
32
31
delete this ;
33
32
}
34
33
35
34
void Release (TActorSystem *actorSystem) override {
36
- FlushAction->Release (actorSystem);
35
+ CompletionLogWrite->SetResult (Result);
36
+ CompletionLogWrite->SetErrorReason (ErrorReason);
37
+ CompletionLogWrite->Release (actorSystem);
37
38
38
39
delete this ;
39
40
}
0 commit comments