You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hedera-node/docs/design/app/blocks/BlockNodeConnection.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,21 +173,23 @@ To detect unresponsive block nodes during message transmission, the connection i
173
173
174
174
#### Timeout Behavior
175
175
176
-
Pipeline operations (`onNext()` and `onComplete()`) are blocking I/O operations that are executed on a separate executor thread with timeout enforcement using `Future.get(timeout)`.
176
+
Pipeline operations (`onNext()` and `onComplete()`) are blocking I/O operations that are executed on a dedicated virtual thread executor with timeout enforcement using `Future.get(timeout)`. Each connection instance creates its own virtual thread executor to isolate pipeline operations from other tasks and prevent blocking.
177
177
178
-
-**onNext() timeout**: When sending block items via `sendRequest()`, the operation is submitted to an executor and the calling thread blocks waiting for completion with a timeout. If the operation does not complete within the configured timeout period:
178
+
-**onNext() timeout**: When sending block items via `sendRequest()`, the operation is submitted to the connection's dedicated executor and the calling thread blocks waiting for completion with a timeout. If the operation does not complete within the configured timeout period:
179
179
- The Future is cancelled to interrupt the blocked operation
180
180
- The timeout metric is incremented
181
181
-`handleStreamFailure()` is triggered (only if connection is still ACTIVE)
182
182
- The connection follows standard failure handling with exponential backoff retry
183
183
- The connection manager will select a different block node for the next attempt if one is available
184
184
-`TimeoutException` is caught and handled internally
185
-
-**onComplete() timeout**: When closing the stream via `closePipeline()`, the operation is submitted to an executor with the same timeout mechanism. If the operation does not complete within the configured timeout period:
185
+
-**onComplete() timeout**: When closing the stream via `closePipeline()`, the operation is submitted to the same dedicated executor with the same timeout mechanism. If the operation does not complete within the configured timeout period:
186
186
- The Future is cancelled to interrupt the blocked operation
187
187
- The timeout metric is incremented
188
188
- Since the connection is already in CLOSING state, only the timeout is logged
189
189
- The connection completes the close operation normally
190
190
191
+
**Note**: The dedicated virtual thread executor is shut down when the connection closes, ensuring no resource leaks.
192
+
191
193
#### Exception Handling
192
194
193
195
The implementation handles multiple exception scenarios:
0 commit comments