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

feat: redistribute traces on peer membership changes #1268

Merged
merged 15 commits into from
Aug 14, 2024

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Aug 12, 2024

Which problem is this PR solving?

Draining incoming and peer queue on peer membership changes
fixes #1258

Short description of the changes

A RedistributeNotifier is introduced in the collector in this PR.

  • It's initialized on refinery start up
  • When a peer membership change is broadcasted, the notifier immediately signals the collect() goroutine to start the redistribution process
  • When multiple peer membership changes happen in a row, it ignores the signal if there's already a redistribution process running

@VinozzZ VinozzZ marked this pull request as ready for review August 12, 2024 22:23
@VinozzZ VinozzZ requested a review from a team as a code owner August 12, 2024 22:23
@VinozzZ VinozzZ added this to the v2.8 milestone Aug 13, 2024
@VinozzZ VinozzZ self-assigned this Aug 13, 2024
Copy link
Contributor

@kentquirk kentquirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One suggestion on a rename.

collect/cache/cache.go Outdated Show resolved Hide resolved
@VinozzZ VinozzZ force-pushed the yingrong.redistribute_traces branch from 7a7ebdf to 7e3a2b1 Compare August 14, 2024 20:27
@VinozzZ VinozzZ merged commit 1aad5b2 into main Aug 14, 2024
5 checks passed
@VinozzZ VinozzZ deleted the yingrong.redistribute_traces branch August 14, 2024 20: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.

Redistribute spans when the number of peers changes
2 participants