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

Remove data race in shard instrumentation #1332

Merged
merged 3 commits into from
May 9, 2024
Merged

Remove data race in shard instrumentation #1332

merged 3 commits into from
May 9, 2024

Conversation

darwin67
Copy link
Collaborator

@darwin67 darwin67 commented May 8, 2024

Description

The function is already called via a goroutine, and nesting further goroutines with variables outside the scope of the goroutines will cause race conditions, especially since the map is not locked on read/write.

Remove the goroutines within shardGauges method, and just run it as a normal loop instead.

Also tidy up some dependencies that are no longer needed.

Type of change (choose one)

  • Chore (refactors, upgrades, etc.)
  • Bug fix (non-breaking change that fixes an issue)
  • Security fix (non-breaking change that fixes a potential vulnerability)
  • Docs
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Checklist

  • I've linked any associated issues to this PR.
  • I've tested my own changes.

Check our Pull Request Guidelines

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
ui ⬜️ Ignored (Inspect) Visit Preview May 9, 2024 0:38am

@darwin67 darwin67 merged commit b92259f into main May 9, 2024
12 checks passed
@darwin67 darwin67 deleted the darwin/data-race branch May 9, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants