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

indexshipper/compactor: fix two race conditions #10313

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

bboreham
Copy link
Contributor

@bboreham bboreham commented Aug 22, 2023

What this PR does / why we need it:
We must call wg.Add before starting the goroutine.
And protect the data in mockCompactorClient.
And another fix in shipper/index/compactor.

Which issue(s) this PR fixes:
Part of #8586

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • NA Documentation added
  • NA Tests updated
  • NA CHANGELOG.md updated
    • NA If the change is worth mentioning in the release notes, add add-to-release-notes label
  • NA Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • NA For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR

We must call wg.Add before starting the goroutine.

And protect the data in mockCompactorClient.
@bboreham bboreham requested a review from a team as a code owner August 22, 2023 19:37
Can't just write to a local variable in a different goroutine.
@MasslessParticle MasslessParticle merged commit ecd371d into grafana:main Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants