Skip to content

Commit

Permalink
added logs for debugging woo-test normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal committed Apr 8, 2024
1 parent a2649d1 commit 43be761
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flow/connectors/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,13 +622,17 @@ func (c *PostgresConnector) NormalizeRecords(ctx context.Context, req *model.Nor
for _, normalizeStatement := range normalizeStatements {
mergeStatementsBatch.Queue(normalizeStatement, normBatchID, req.SyncBatchID, destinationTableName).Exec(
func(ct pgconn.CommandTag) error {
c.logger.Info("callback for merge statement", "destinationTableName", destinationTableName,
"rowsAffected", ct.RowsAffected())
totalRowsAffected += int(ct.RowsAffected())
return nil
})
}
}
if mergeStatementsBatch.Len() > 0 {
c.logger.Info("before mergeResults")
mergeResults := normalizeRecordsTx.SendBatch(ctx, mergeStatementsBatch)
c.logger.Info("after mergeResults, before close")
err = mergeResults.Close()
if err != nil {
return nil, fmt.Errorf("error executing merge statements: %w", err)
Expand Down

0 comments on commit 43be761

Please sign in to comment.