refactor(csharp): cleanup tcp connection after vsr implementation - #3858
refactor(csharp): cleanup tcp connection after vsr implementation#3858lukaszzborek wants to merge 19 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3858 +/- ##
============================================
- Coverage 83.67% 83.15% -0.52%
+ Complexity 1358 1340 -18
============================================
Files 1212 1220 +8
Lines 165138 164377 -761
Branches 132612 132688 +76
============================================
- Hits 138181 136695 -1486
- Misses 23308 23928 +620
- Partials 3649 3754 +105
🚀 New features to boost your workflow:
|
|
If possible, merge #3836 first. Then I will remove things with namespace which I refactoring 😅 |
hubcio
left a comment
There was a problem hiding this comment.
solid direction overall - classic framing gone, the VsrConnection extraction, typed namespaces and the epoch rejoin are real improvements. blocking items are the probe losing its reconnect, the never-nulled _connection, the fail-open namespace and the edge-based Disconnected clear; the rest is small.
one thing outside the diff: SetConnectionStateAsync (TcpMessageStream.cs:1153) is a non-atomic check-then-set with the publish after the write, reachable from callers holding different locks - concurrent transitions can publish duplicates or a PreviousState that never actually preceded CurrentState. it predates this PR, and fixing it properly means moving the publish behind an ordered queue (holding a lock across the publish is not an option - the handler chain runs synchronously into socket I/O when the semaphores are uncontended, so a sync write fault re-enters the same lock). follow-up material, but it is the substrate under the Disconnected-clear race flagged inline.
# Conflicts: # foreign/csharp/Iggy_SDK/Vsr/VsrHeader.cs # foreign/csharp/Iggy_SDK/Vsr/VsrNamespace.cs # foreign/csharp/Iggy_SDK_Tests/VsrTests/VsrHeaderTests.cs # foreign/csharp/Iggy_SDK_Tests/VsrTests/VsrNamespaceTests.cs
# Conflicts: # foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs
6ce3fe0 to
a68c9b0
Compare
…synchronous calls
aae1d4b to
ebad2d9
Compare
|
/ready |
# Conflicts: # foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs # foreign/csharp/Iggy_SDK_Tests/MapperTests/BinaryMapper.cs
# Conflicts: # foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.cs
# Conflicts: # foreign/csharp/Iggy_SDK/IggyClient/Implementations/TcpMessageStream.Vsr.cs
Follow-up cleanup of the .NET SDK TCP transport after the VSR support landed