-
Notifications
You must be signed in to change notification settings - Fork 5
feat: terminate stream if client is dropping the connection #463
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #463 +/- ##
==========================================
- Coverage 71.43% 70.91% -0.53%
==========================================
Files 223 226 +3
Lines 12404 12446 +42
==========================================
- Hits 8861 8826 -35
- Misses 3543 3620 +77 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be good to have tests to cover that a stream close as expected now. I can see that there is two test placeholder that can fit this:
crates/topos-tce-api/src/stream/tests.rs
#[test(tokio::test)]
#[ignore = "not yet implemented"]
async fn closing_client_stream() {}
#[test(tokio::test)]
#[ignore = "not yet implemented"]
async fn closing_server_stream() {}
@Freyskeyd can be re-reviewed! Added a test for |
Description
In our current setup, the
sequencer
is opening a gRPC stream to thetce
. If successful, we senddelivered_certificates
back to thesequencer
(or any other client). However, ifsequencer
shuts down (or restarts), the stream was not closed on thetce
side, resulting in multiple open streams with dangling connections.This PR is fixing this issue by handling the error cases of a streaming message.
Fixes TP-500
Result
Left ToDo
active_streams
PR Checklist: