Skip to content

Commit

Permalink
sink: fix the memory leak in sink manager (#1401)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoppro authored Feb 4, 2021
1 parent 79e4595 commit a37efea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cdc/sink/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (t *tableSink) FlushRowChangedEvents(ctx context.Context, resolvedTs uint64
return t.manager.flushBackendSink(ctx)
}
resolvedRows := t.buffer[:i]
t.buffer = t.buffer[i:]
t.buffer = append(make([]*model.RowChangedEvent, 0, len(t.buffer[i:])), t.buffer[i:]...)

err := t.manager.backendSink.EmitRowChangedEvents(ctx, resolvedRows...)
if err != nil {
Expand Down

0 comments on commit a37efea

Please sign in to comment.