Skip to content
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

Data race in queryAPI #379

Open
jpmeijers opened this issue May 10, 2023 · 0 comments
Open

Data race in queryAPI #379

jpmeijers opened this issue May 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jpmeijers
Copy link

Specifications

  • Client Version: v2.12.3
  • InfluxDB Version: 2.6.1
  • Platform: Ubuntu

Steps to reproduce

  1. Make Query() calls on the same queryAPI from 20+ goroutines, at the same time.

Expected behavior

The library should not have any race conditions.

Actual behavior

A data race warning is triggered when tests are run.

Additional info

WARNING: DATA RACE
Read at 0x00c000301660 by goroutine 24:
  github.com/influxdata/influxdb-client-go/v2/api.(*queryAPI).queryURL()
      /home/jpmeijers/GolandProjects/wsq-api/vendor/github.com/influxdata/influxdb-client-go/v2/api/query.go:235 +0x58
  github.com/influxdata/influxdb-client-go/v2/api.(*queryAPI).QueryWithParams()
      /home/jpmeijers/GolandProjects/wsq-api/vendor/github.com/influxdata/influxdb-client-go/v2/api/query.go:195 +0xef
  github.com/influxdata/influxdb-client-go/v2/api.(*queryAPI).Query()
      /home/jpmeijers/GolandProjects/wsq-api/vendor/github.com/influxdata/influxdb-client-go/v2/api/query.go:187 +0x6e
<redacted own source files>

Previous write at 0x00c000301660 by goroutine 27:
  github.com/influxdata/influxdb-client-go/v2/api.(*queryAPI).queryURL()
      /home/jpmeijers/GolandProjects/wsq-api/vendor/github.com/influxdata/influxdb-client-go/v2/api/query.go:246 +0x2be
  github.com/influxdata/influxdb-client-go/v2/api.(*queryAPI).QueryWithParams()
      /home/jpmeijers/GolandProjects/wsq-api/vendor/github.com/influxdata/influxdb-client-go/v2/api/query.go:195 +0xef
  github.com/influxdata/influxdb-client-go/v2/api.(*queryAPI).Query()
      /home/jpmeijers/GolandProjects/wsq-api/vendor/github.com/influxdata/influxdb-client-go/v2/api/query.go:187 +0x6e
  
<redacted own source files>
@jpmeijers jpmeijers added the bug Something isn't working label May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant