Skip to content

Commit

Permalink
one more small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Nov 20, 2023
1 parent 302c25d commit c6f0f1e
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 @@ -254,7 +254,7 @@ func (p *PostgresCDCSource) consumeStream(

// if we are past the next standby deadline (?)
if time.Now().After(nextStandbyMessageDeadline) {
if !p.commitLock {
if !p.commitLock && len(localRecords) > 0 {
log.Infof(
"[%s] Stand-by deadline exceeded, returning currently accumulated records - %d",
req.FlowJobName,
Expand All @@ -263,7 +263,7 @@ func (p *PostgresCDCSource) consumeStream(
return nil
} else {
// we need to wait for next commit.
waitingForCommit = true
waitingForCommit = p.commitLock
nextStandbyMessageDeadline = time.Now().Add(standbyMessageTimeout)
}
}
Expand Down

0 comments on commit c6f0f1e

Please sign in to comment.