Skip to content

Commit a74a5b3

Browse files
committed
updates
Signed-off-by: Derek Riley <derek.riley@swirldslabs.com>
1 parent 0e9828e commit a74a5b3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

hedera-node/docs/design/app/blocks/BlockNodeConnectionManager.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ Used when retrying the same block node after transient issues:
162162
- **Reset**: Retry count resets if no retry occurs within `protocolExpBackoffTimeframeReset` duration
163163
- **Behavior**: Connection retries the same node without selecting a new one
164164

165+
#### Forced Connection Switch Retry Delay
166+
167+
When another block node should be selected and forced to become active, the previous active connection
168+
is closed and scheduled for retry after a fixed delay of 180s (`blockNode.forcedSwitchRescheduleDelay`).
169+
165170
#### Retry State Management
166171

167172
- `RetryState` tracks retry attempts and last retry time per node configuration

hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/impl/streaming/BlockNodeConnectionManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ public void run() {
813813
logger.error(
814814
"Failed to schedule reschedule for previous active connection after forced switch.",
815815
e);
816-
connections.remove(connection.getNodeConfig());
816+
connections.remove(activeConnection.getNodeConfig());
817817
}
818818
}
819819
} catch (final RuntimeException e) {
@@ -1101,7 +1101,7 @@ public BlockNodeStats.HighLatencyResult recordBlockAckAndCheckLatency(
11011101
* This allows the manager to update its internal state accordingly.
11021102
* @param connection the connection that has been closed
11031103
*/
1104-
public void notifyConnectionClosed(final BlockNodeConnection connection) {
1104+
public void notifyConnectionClosed(@NonNull final BlockNodeConnection connection) {
11051105
// Remove from active connection if it is the current active
11061106
activeConnectionRef.compareAndSet(connection, null);
11071107

0 commit comments

Comments
 (0)