forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Consensus] subscriber counter to atomically set node status (MystenL…
…abs#19313) ## Description Looking on the connectivity metrics for the subscribed peers I believe it's possible to have some race conditions when nodes quickly connect/disconnect. As the metric is a gauge the last who sets the value "wins", so it's possible that we might have nodes connecting again while the earlier connection has not been dropped yet - which consequently once dropped it will make the peer appear in metrics as disconnected. The PR is refactoring a bit that part and only sets the peer as disconnected when there is no other pending connection. ## Test plan CI --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API:
- Loading branch information
Showing
1 changed file
with
67 additions
and
42 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