You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example for how to do transactions with pgx added in #3557 will always run Rollback. The rollback will return an error which appears silent, but isn't if pgx is wrapped in opentelemetry tracing.
Instead of always doing a Rollback I believe you can make a context.WithCancel context and then defer cancel() will rollback the transaction if it's not already committed.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
No response
What database engines are you using?
No response
What type of code are you generating?
No response
The text was updated successfully, but these errors were encountered:
Version
1.28.0
What happened?
The example for how to do transactions with pgx added in #3557 will always run
Rollback
. The rollback will return an error which appears silent, but isn't if pgx is wrapped in opentelemetry tracing.Instead of always doing a Rollback I believe you can make a
context.WithCancel
context and thendefer cancel()
will rollback the transaction if it's not already committed.Relevant log output
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
No response
What database engines are you using?
No response
What type of code are you generating?
No response
The text was updated successfully, but these errors were encountered: