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

SQLStore: Fix race condition in RecursiveQueriesAreSupported #75274

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

grobinson-grafana
Copy link
Contributor

What is this feature?

This commit fixes a race condition in RecursiveQueriesAreSupported:

WARNING: DATA RACE
Read at 0x00c0022aa520 by goroutine 15652:
  github.com/grafana/grafana/pkg/services/sqlstore.(*SQLStore).RecursiveQueriesAreSupported()
      /Users/grobinson/go/src/github.com/grafana/grafana/pkg/services/sqlstore/sqlstore.go:527 +0x34
  github.com/grafana/grafana/pkg/services/dashboards/database.(*dashboardStore).FindDashboards()
      /Users/grobinson/go/src/github.com/grafana/grafana/pkg/services/dashboards/database/database.go:963 +0x54

Previous write at 0x00c0022aa520 by goroutine 15648:
  github.com/grafana/grafana/pkg/services/sqlstore.(*SQLStore).RecursiveQueriesAreSupported()
      /Users/grobinson/go/src/github.com/grafana/grafana/pkg/services/sqlstore/sqlstore.go:559 +0xa0
  github.com/grafana/grafana/pkg/services/dashboards/database.(*dashboardStore).FindDashboards()
      /Users/grobinson/go/src/github.com/grafana/grafana/pkg/services/dashboards/database/database.go:963 +0x54

Why do we need this feature?

[Add a description of the problem the feature is trying to solve.]

Who is this feature for?

[Add information on what kind of user the feature is for.]

Which issue(s) does this PR fix?:

Fixes #

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@grafana-delivery-bot
Copy link
Contributor

Hello @grobinson-grafana!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

@grafana-delivery-bot
Copy link
Contributor

Hello @grobinson-grafana!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

@grobinson-grafana grobinson-grafana merged commit 15f6e8a into main Sep 22, 2023
31 checks passed
@grobinson-grafana grobinson-grafana deleted the grobinson/fix-data-race-sqlstore branch September 22, 2023 10:30
grafana-delivery-bot bot pushed a commit that referenced this pull request Sep 22, 2023
grafana-delivery-bot bot pushed a commit that referenced this pull request Sep 22, 2023
@zerok zerok modified the milestones: 10.2.x, 10.2.0 Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants