Skip to content

Commit 121c8b3

Browse files
authored
Fixed finalizer leak (#12679)
1 parent c92ef24 commit 121c8b3

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

ydb/core/tx/schemeshard/schemeshard_cdc_stream_scan.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class TCdcStreamScanFinalizer: public TActorBootstrapped<TCdcStreamScanFinalizer
5353
void Handle(TEvTxUserProxy::TEvAllocateTxIdResult::TPtr& ev) {
5454
Request->Record.SetTxId(ev->Get()->TxId);
5555
Send(SSActorId, Request.Release());
56+
TActorBootstrapped::PassAway();
5657
}
5758

5859
private:
@@ -126,7 +127,7 @@ struct TSchemeShard::TCdcStreamScan::TTxProgress: public TTransactionBase<TSchem
126127
}
127128

128129
if (Finalize) {
129-
Self->CdcStreamScanFinalizer = ctx.Register(new TCdcStreamScanFinalizer(ctx.SelfID, std::move(Finalize)));
130+
ctx.Register(new TCdcStreamScanFinalizer(ctx.SelfID, std::move(Finalize)));
130131
}
131132
}
132133

ydb/core/tx/schemeshard/schemeshard_impl.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4512,10 +4512,6 @@ void TSchemeShard::Die(const TActorContext &ctx) {
45124512
ctx.Send(TabletMigrator, new TEvents::TEvPoisonPill());
45134513
}
45144514

4515-
if (CdcStreamScanFinalizer) {
4516-
ctx.Send(CdcStreamScanFinalizer, new TEvents::TEvPoisonPill());
4517-
}
4518-
45194515
IndexBuildPipes.Shutdown(ctx);
45204516
CdcStreamScanPipes.Shutdown(ctx);
45214517
ShardDeleter.Shutdown(ctx);

ydb/core/tx/schemeshard/schemeshard_impl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ class TSchemeShard
352352

353353
TActorId TabletMigrator;
354354

355-
TActorId CdcStreamScanFinalizer;
356355
ui32 MaxCdcInitialScanShardsInFlight = 10;
357356

358357
TDuration StatsMaxExecuteTime;

0 commit comments

Comments
 (0)