Skip to content

Data race in queryAPI #379

Open
Open
@jpmeijers

Description

@jpmeijers

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions