From 7cbd62ca0c698fc0ea5768c2659627a0da54b2b5 Mon Sep 17 00:00:00 2001 From: Herman Schaaf Date: Wed, 19 Apr 2023 11:59:30 +0100 Subject: [PATCH] Undo release of all resources in managed writer --- plugins/destination/managed_writer.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/destination/managed_writer.go b/plugins/destination/managed_writer.go index 3abd35802b..9588e4ac7b 100644 --- a/plugins/destination/managed_writer.go +++ b/plugins/destination/managed_writer.go @@ -70,9 +70,6 @@ func (p *Plugin) flush(ctx context.Context, metrics *Metrics, table *arrow.Schem p.logger.Info().Str("table", tableName).Int("len", batchSize).Dur("duration", time.Since(start)).Msg("batch written successfully") atomic.AddUint64(&metrics.Writes, uint64(batchSize)) } - for _, r := range resources { - r.Release() - } } func (*Plugin) removeDuplicatesByPK(table *arrow.Schema, resources []arrow.Record) []arrow.Record { @@ -95,7 +92,7 @@ func (*Plugin) removeDuplicatesByPK(table *arrow.Schema, resources []arrow.Recor res = append(res, r) continue } - // duplicate, release early + // duplicate, release r.Release() }