-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nrpgx5 data-race #855
Comments
@UnAfraid can you confirm that this only happens when using nrpgx5, and not just with pgx5? Is this code block a reproducer? cfg, err := pgxpool.ParseConfig("postgres://postgres:postgres@localhost:5432")
if err != nil {
panic(err)
}
cfg.ConnConfig.Tracer = nrpgx5.NewTracer()
db, err := pgxpool.NewWithConfig(context.Background(), cfg)
if err != nil {
panic(err)
} |
I have an integration test working with pgx5 for quite a while now and it works fine
The data race started happening as soon as i added |
Thanks! We will spend some time diving into this then. |
I ran into the same issue. It happens because when you follow the example in this repo and assign the tracer with I got around this by using
|
Thanks @WillAbides. This seems to be in line with how the documentation recommends using pgx5 pool in threaded contexts. We will update the documentation on our end and credit you in the commit! |
Description
nrpgx5 tracer causes data-race
During integration test with testcontainers we observed data races even when new relic application is not initialized
The text was updated successfully, but these errors were encountered: