Skip to content

Commit

Permalink
fix more
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Nov 16, 2023
1 parent 52257d6 commit efb5dd4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions flow/connectors/postgres/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,10 @@ func (p *PostgresCDCSource) consumeStream(
pkmRequiresResponse = false
}

if time.Now().After(nextStandbyMessageDeadline) {
if len(localRecords) <= 1 {
log.Infof("pushing the standby deadline to %s", time.Now().Add(standbyMessageTimeout))
log.Infof("num records accumulated: %d", len(localRecords))
nextStandbyMessageDeadline = time.Now().Add(standbyMessageTimeout)
}
if len(localRecords) <= 1 {
log.Infof("pushing the standby deadline to %s", time.Now().Add(standbyMessageTimeout))
log.Infof("num records accumulated: %d", len(localRecords))
nextStandbyMessageDeadline = time.Now().Add(standbyMessageTimeout)
}

if (len(localRecords) >= int(req.MaxBatchSize)) && !p.commitLock {
Expand Down

0 comments on commit efb5dd4

Please sign in to comment.