Skip to content

Commit

Permalink
fix oom
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Dec 17, 2023
1 parent 25e39ae commit 533d6c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flow/connectors/postgres/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ func (p *PostgresCDCSource) consumeStream(

pkmRequiresResponse := false
waitingForCommit := false
maxBatchSize := req.MaxBatchSize
maxBatchSize = 1000

for {
if pkmRequiresResponse {
Expand All @@ -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
}

Expand Down

0 comments on commit 533d6c9

Please sign in to comment.