Skip to content

Commit

Permalink
push at least not equals
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Oct 20, 2023
1 parent 41dfd4f commit ea7646d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flow/connectors/postgres/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (p *PostgresCDCSource) consumeStream(

for {
if time.Now().After(nextStandbyMessageDeadline) ||
(len(records.Records) == int(req.MaxBatchSize)) {
(len(records.Records) >= int(req.MaxBatchSize)) {
// Update XLogPos to the last processed position, we can only confirm
// that this is the last row committed on the destination.
err := pglogrepl.SendStandbyStatusUpdate(p.ctx, conn,
Expand All @@ -170,7 +170,7 @@ func (p *PostgresCDCSource) consumeStream(
log.Infof("Sent Standby status message. %s", numRowsProcessedMessage)
nextStandbyMessageDeadline = time.Now().Add(standbyMessageTimeout)

if !p.commitLock && (len(records.Records) == int(req.MaxBatchSize)) {
if !p.commitLock && (len(records.Records) >= int(req.MaxBatchSize)) {
return result, nil
}
}
Expand Down

0 comments on commit ea7646d

Please sign in to comment.