-
Notifications
You must be signed in to change notification settings - Fork 179
fix: BlockBufferService forceful BN Switch #21803
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #21803 +/- ##
============================================
+ Coverage 70.62% 70.81% +0.19%
- Complexity 24353 24377 +24
============================================
Files 2673 2667 -6
Lines 104202 104188 -14
Branches 10935 10942 +7
============================================
+ Hits 73591 73785 +194
+ Misses 26567 26365 -202
+ Partials 4044 4038 -6
... and 67 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
...-app/src/main/java/com/hedera/node/app/blocks/impl/streaming/BlockNodeConnectionManager.java
Outdated
Show resolved
Hide resolved
|
Probably the .md files will need some updating after these changes too. |
...-app/src/main/java/com/hedera/node/app/blocks/impl/streaming/BlockNodeConnectionManager.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
Description:
This pull request refactors the block node connection management logic to improve how connections are cleaned up and rescheduled, especially during stream resets and forced switches. The changes remove redundant cleanup methods, introduce a configurable delay for rescheduling connections after a forced switch, and update related tests to reflect the new behavior. The code now exposes connection state for easier management and testing.
This PR fixes bugs with connection promotion/switching, making sure the connection is removed from the manager's internal state so the node's are able to be connected to in the future.
Connection Cleanup and Rescheduling Improvements
connectionResetsTheStreamandremoveConnectionAndClearActivemethods fromBlockNodeConnectionManager, consolidating connection cleanup logic and making rescheduling more explicit. Stream resets now directly trigger selection of a new block node for streaming.BlockNodeConnectionForced Switch Handling
forcedSwitchRescheduleDelaytoBlockNodeConnectionConfig, allowing the delay for rescheduling a closed active connection after a forced switch to be set via configuration.Testing
Related issue(s):
Fixes #21734
Notes for reviewer:
Checklist