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: unregister peer asap on shutdown #1260

Merged
merged 5 commits into from
Aug 1, 2024

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Jul 31, 2024

Which problem is this PR solving?

In order to recalculate new destination for traces during shutdown as soon as possible, we need to announce peer unregistration first thing.

Short description of the changes

  • use the done channel from catching the termination signal in main.go in peer management

@VinozzZ VinozzZ marked this pull request as ready for review July 31, 2024 22:45
@VinozzZ VinozzZ requested a review from a team as a code owner July 31, 2024 22:45
@VinozzZ VinozzZ added this to the v2.8 milestone Jul 31, 2024
@VinozzZ VinozzZ changed the title feat: unregister peer asasp on shutdown feat: unregister peer asap on shutdown Jul 31, 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.

Code-wise, this is fine -- if it's actually what we want.

I do think we should tell our peers to stop sending to us immediately, but we might need to do it with a "pause" message or something like that -- because we ALSO need to be draining spans by sending them to the other peers. If we drop out of the peer list entirely, then we have no way to forward spans anymore.

So I think we need to add a way to indicate that a peer is still alive but should not be a target of new traffic.

@VinozzZ VinozzZ requested a review from kentquirk August 1, 2024 20:14
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.

👍

@VinozzZ VinozzZ merged commit 32a662f into main Aug 1, 2024
5 checks passed
@VinozzZ VinozzZ deleted the yingrong.drain_traces_on_shutdown branch August 1, 2024 20:46
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.

2 participants