From 533d6c9da25dae432c8c691765b48189a1104049 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Sun, 17 Dec 2023 18:47:35 -0500 Subject: [PATCH] fix oom --- flow/connectors/postgres/cdc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flow/connectors/postgres/cdc.go b/flow/connectors/postgres/cdc.go index d10197dea8..97ac511304 100644 --- a/flow/connectors/postgres/cdc.go +++ b/flow/connectors/postgres/cdc.go @@ -240,6 +240,8 @@ func (p *PostgresCDCSource) consumeStream( pkmRequiresResponse := false waitingForCommit := false + maxBatchSize := req.MaxBatchSize + maxBatchSize = 1000 for { if pkmRequiresResponse { @@ -260,7 +262,7 @@ func (p *PostgresCDCSource) consumeStream( pkmRequiresResponse = false } - if (cdcRecordsStorage.Len() >= int(req.MaxBatchSize)) && !p.commitLock { + if (cdcRecordsStorage.Len() >= int(maxBatchSize)) && !p.commitLock { return nil }