Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Dec 14, 2023
1 parent ef83b6f commit aa7a05e
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 @@ -248,7 +248,8 @@ func (p *PostgresCDCSource) consumeStream(
// that this is the last row committed on the destination.
if proposedConsumedXLogPos > consumedXLogPos {
p.logger.Info(fmt.Sprintf("Heartbeat adjusting lsn from %d to %d", consumedXLogPos, proposedConsumedXLogPos))
err := p.SetLastOffset(int64(proposedConsumedXLogPos))
consumedXLogPos = proposedConsumedXLogPos
err := p.SetLastOffset(int64(consumedXLogPos))
if err != nil {
return fmt.Errorf("[initial-flush] storing updated LSN failed: %w", err)
}
Expand All @@ -259,7 +260,6 @@ func (p *PostgresCDCSource) consumeStream(
if err != nil {
return fmt.Errorf("SendStandbyStatusUpdate failed: %w", err)
}
consumedXLogPos = proposedConsumedXLogPos
pkmRequiresResponse = false

if time.Since(standByLastLogged) > 10*time.Second {
Expand Down

0 comments on commit aa7a05e

Please sign in to comment.