-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: join peer list only after refinery is ready to accept traffic (#…
…1309) ## Which problem is this PR solving? Currently, Refinery announces its presence to peers immediately upon startup. This causes the sharding algorithm to direct other peers to forward traces to the newly added Refinery instance, even though it might not be ready to process them. As a result, any spans forwarded before the Refinery is fully operational are lost. This fix ensures that Refinery only announces itself to peers once it is fully ready to accept and process traffic, preventing any loss of spans during startup. Alternatives: I have tried to use the `health` module as a signal to indicate when the `router` is ready for the `peers` module. However, due to the way the `injection` library works, the `router` starts after the `peers` module. As a result, when `peers` checks in with the health system, the `router` may not have registered itself yet. This can cause `IsReady` to return true prematurely, before the `router` is included in the health checks. ## Short description of the changes - Add a `Ready` method on `Peers` - call `Peers.Ready()` once all components have started
- Loading branch information
Showing
5 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters