From 43be761611515c8d88652a364e9609e2e27d727b Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Mon, 8 Apr 2024 23:18:26 +0530 Subject: [PATCH] added logs for debugging woo-test normalize --- flow/connectors/postgres/postgres.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flow/connectors/postgres/postgres.go b/flow/connectors/postgres/postgres.go index 6fdf77f9d8..96fa2b5da8 100644 --- a/flow/connectors/postgres/postgres.go +++ b/flow/connectors/postgres/postgres.go @@ -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)