Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed May 24, 2024
1 parent 0c55fb8 commit 4fc4df0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions flow/connectors/postgres/qrep_query_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ func (qe *QRepQueryExecutor) processRowsStream(
record, err := qe.mapRowToQRecord(rows, fieldDescriptions)
if err != nil {
qe.logger.Error("[pg_query_executor] failed to map row to QRecord", slog.Any("error", err))
stream.Close(fmt.Errorf("failed to map row to QRecord: %w", err))
return 0, fmt.Errorf("failed to map row to QRecord: %w", err)
err := fmt.Errorf("failed to map row to QRecord: %w", err)
stream.Close(err)
return 0, err
}

stream.Records <- record
Expand Down
2 changes: 1 addition & 1 deletion flow/connectors/postgres/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type PgCopyReader struct {

func NewPgCopyPipe() (PgCopyReader, PgCopyWriter) {
read, write := io.Pipe()
schema := PgCopyShared{}
schema := PgCopyShared{schemaLatch: make(chan struct{}, 0)}

Check failure on line 48 in flow/connectors/postgres/sink.go

View workflow job for this annotation

GitHub Actions / lint

S1019: should use make(chan struct{}) instead (gosimple)
return PgCopyReader{PipeReader: read, schema: &schema},
PgCopyWriter{PipeWriter: write, schema: &schema}
}
Expand Down

0 comments on commit 4fc4df0

Please sign in to comment.