Skip to content

chore(transport): retire the internal TCP runtime - #496

Merged
yordis merged 13 commits into
masterfrom
yordis/chore-remove-legacy-tcp-runtime
Sep 24, 2026
Merged

yordis merged 13 commits into
masterfrom
yordis/chore-remove-legacy-tcp-runtime

Conversation

@yordis

@yordis yordis commented Sep 12, 2026 •

Copy link
Copy Markdown
Member
  • Removes an unsupported transport runtime so the server has one internal communication path.

@yordis
yordis requested a review from a team as a code owner September 12, 2026 23:22
@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 0f331f9f-8b44-491a-ae74-67af6e344fc6

📥 Commits

Reviewing files that changed from the base of the PR and between 91fdde0 and a80b6af.

⛔ Files ignored due to path filters (1)
  • proto.lock is excluded by !**/*.lock
📒 Files selected for processing (30)
  • src/EventStore.ClusterNode/Components/Services/ClusterStatusService.cs
  • src/EventStore.Core.Tests/Cluster/MemberInfoTests.cs
  • src/EventStore.Core.Tests/EventStore.Core.Tests.csproj
  • src/EventStore.Core.Tests/Helpers/MiniClusterNode.cs
  • src/EventStore.Core.Tests/Integration/Archive/when_archiving_and_restoring_a_cluster.cs
  • src/EventStore.Core.Tests/Integration/specification_with_cluster.cs
  • src/EventStore.Core.Tests/Integration/when_node_becomes_leader_with_unindexed_data.cs
  • src/EventStore.Core.Tests/Regression/ClusterStatusServiceTests.cs
  • src/EventStore.Core.Tests/Services/ElectionsService/ElectionsServiceTests.cs
  • src/EventStore.Core.Tests/Services/GossipService/NodeGossipServiceTests.cs
  • src/EventStore.Core.Tests/Services/Replication/ReadOnlyReplica/connecting_to_read_only_replica.cs
  • src/EventStore.Core.Tests/Services/RequestForwarding/GrpcRequestForwardingServiceTests.cs
  • src/EventStore.Core.Tests/Services/RequestForwarding/GrpcRequestForwardingTransportSecurityTests.cs
  • src/EventStore.Core.Tests/Services/Transport/Grpc/Replication/GrpcReplicaServiceSupervisorTests.cs
  • src/EventStore.Core.Tests/Services/Transport/Tcp/ssl_connection.cs
  • src/EventStore.Core.Tests/Services/Transport/Tcp/ssl_connections_mutual_auth.cs
  • src/EventStore.Core.Tests/TransactionLog/Truncation/when_truncating_database.cs
  • src/EventStore.Core.XUnit.Tests/Configuration/ClusterNodeOptionsTests/when_building/with_cluster_node_and_custom_settings.cs
  • src/EventStore.Core/Cluster/ClientClusterInfo.cs
  • src/EventStore.Core/Cluster/ClusterInfo.cs
  • src/EventStore.Core/Cluster/MemberInfo.cs
  • src/EventStore.Core/ClusterVNode.cs
  • src/EventStore.Core/Configuration/ClusterVNodeOptions.cs
  • src/EventStore.Core/Data/GossipAdvertiseInfo.cs
  • src/EventStore.Core/Data/VNodeInfo.cs
  • src/EventStore.Core/Services/ElectionsService.cs
  • src/EventStore.Core/Services/Gossip/GossipServiceBase.cs
  • src/EventStore.Core/Services/Gossip/NodeGossipService.cs
  • src/EventStore.Core/Services/RequestForwarding/GrpcRequestForwardingSupervisor.cs
  • src/EventStore.Projections.Core.Tests/ClientAPI/Cluster/specification_with_standard_projections_runnning.cs
 _____________________________________________________
< Merge conflicts fear my conflict-resolution skills. >
 -----------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 2dc18665-68d4-4b2f-8e87-a33932117ca9

📥 Commits

Reviewing files that changed from the base of the PR and between d04c94d and 91fdde0.

📒 Files selected for processing (49)
  • src/EventStore.Core.Tests/EventStore.Core.Tests.csproj
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/ca/ca.crt
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/ca/ca.key
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/ca_untrusted/ca.crt
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/ca_untrusted/ca.key
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/generate_ca.sh
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/generate_cert.sh
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node1/node1.crt
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node1/node1.key
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node2/node2.crt
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node2/node2.key
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node3/node3.crt
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node3/node3.key
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/untrusted/untrusted.crt
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/untrusted/untrusted.key
  • src/EventStore.Core/Authorization/AuthorizationPolicies/LegacyPolicySelectorFactory.cs
  • src/EventStore.Core/ClusterVNode.cs
  • src/EventStore.Core/EventStore.Core.csproj
  • src/EventStore.Core/Helpers/IAsyncMessageFramer.cs
  • src/EventStore.Core/Helpers/LengthPrefixSuffixFramer.cs
  • src/EventStore.Core/Helpers/MessageFramingException.cs
  • src/EventStore.Core/Messages/ClientMessage.cs
  • src/EventStore.Core/Messages/TcpClientMessageDto.cs
  • src/EventStore.Core/Messages/TcpMessage.cs
  • src/EventStore.Core/Messaging/CoreMessage.cs
  • src/EventStore.Core/NodeTcpOptions.cs
  • src/EventStore.Core/Services/AuthorizationGateway.cs
  • src/EventStore.Core/Services/Monitoring/SystemStatsHelper.cs
  • src/EventStore.Core/Services/PersistentSubscription/PersistentSubscriptionService.cs
  • src/EventStore.Core/Services/Replication/LogRecordFramer.cs
  • src/EventStore.Core/Services/Replication/TransactionFramer.cs
  • src/EventStore.Core/Services/RequestForwardingService.cs
  • src/EventStore.Core/Services/Storage/ReaderIndex/EventFilter.cs
  • src/EventStore.Core/Services/SubscriptionsService.cs
  • src/EventStore.Core/Services/TcpSendService.cs
  • src/EventStore.Core/Services/Transport/Tcp/ClientTcpDispatcher.cs
  • src/EventStore.Core/Services/Transport/Tcp/ClientWriteTcpDispatcher.cs
  • src/EventStore.Core/Services/Transport/Tcp/ITcpDispatcher.cs
  • src/EventStore.Core/Services/Transport/Tcp/ProtobufExtensions.cs
  • src/EventStore.Core/Services/Transport/Tcp/SendOverTcpEnvelope.cs
  • src/EventStore.Core/Services/Transport/Tcp/TcpCommand.cs
  • src/EventStore.Core/Services/Transport/Tcp/TcpConnectionManager.cs
  • src/EventStore.Core/Services/Transport/Tcp/TcpDispatcher.cs
  • src/EventStore.Core/Services/Transport/Tcp/TcpPackage.cs
  • src/EventStore.Core/Services/Transport/Tcp/TcpService.cs
  • src/EventStore.Core/Services/Transport/Tcp/UnableToAcquireStreamException.cs
  • src/EventStore.Core/Settings/VNodeSettings.cs
  • src/EventStore.Core/Util/Opts.cs
  • src/Protos/ClientAPI/ClientMessageDtos.proto
💤 Files with no reviewable changes (42)
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/ca/ca.key
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/untrusted/untrusted.key
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/ca_untrusted/ca.key
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/untrusted/untrusted.crt
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/generate_cert.sh
  • src/EventStore.Core/Services/Monitoring/SystemStatsHelper.cs
  • src/EventStore.Core/Services/Transport/Tcp/TcpPackage.cs
  • src/EventStore.Core/Services/Transport/Tcp/ClientWriteTcpDispatcher.cs
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/ca/ca.crt
  • src/EventStore.Core/Settings/VNodeSettings.cs
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/ca_untrusted/ca.crt
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node2/node2.crt
  • src/EventStore.Core/Messages/ClientMessage.cs
  • src/EventStore.Core/Services/TcpSendService.cs
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node2/node2.key
  • src/EventStore.Core/Services/Transport/Tcp/UnableToAcquireStreamException.cs
  • src/EventStore.Core/Services/Transport/Tcp/ClientTcpDispatcher.cs
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node3/node3.crt
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node3/node3.key
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/generate_ca.sh
  • src/EventStore.Core/ClusterVNode.cs
  • src/EventStore.Core/Services/Transport/Tcp/SendOverTcpEnvelope.cs
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node1/node1.crt
  • src/EventStore.Core/Services/RequestForwardingService.cs
  • src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/node1/node1.key
  • src/EventStore.Core/Messages/TcpMessage.cs
  • src/EventStore.Core/Services/Transport/Tcp/TcpConnectionManager.cs
  • src/EventStore.Core/Services/Transport/Tcp/ProtobufExtensions.cs
  • src/EventStore.Core/Services/Transport/Tcp/TcpDispatcher.cs
  • src/EventStore.Core/NodeTcpOptions.cs
  • src/Protos/ClientAPI/ClientMessageDtos.proto
  • src/EventStore.Core/Messaging/CoreMessage.cs
  • src/EventStore.Core/Services/Transport/Tcp/TcpCommand.cs
  • src/EventStore.Core/Services/Transport/Tcp/ITcpDispatcher.cs
  • src/EventStore.Core/Services/SubscriptionsService.cs
  • src/EventStore.Core/Authorization/AuthorizationPolicies/LegacyPolicySelectorFactory.cs
  • src/EventStore.Core/EventStore.Core.csproj
  • src/EventStore.Core/Services/Transport/Tcp/TcpService.cs
  • src/EventStore.Core/Util/Opts.cs
  • src/EventStore.Core/Messages/TcpClientMessageDto.cs
  • src/EventStore.Core.Tests/EventStore.Core.Tests.csproj
  • src/EventStore.Core/Services/PersistentSubscription/PersistentSubscriptionService.cs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The change removes the legacy TCP transport, its protocol definitions, dispatchers, connection services, settings, project wiring, and test certificates. It adds core framing abstractions and updates event-filter parsing and authentication handling to use remaining core and client-message paths.

Changes

TCP transport removal

Layer / File(s) Summary
Core framing and filter updates
src/EventStore.Core/Helpers/*, src/EventStore.Core/Services/Replication/*, src/EventStore.Core/Services/Storage/ReaderIndex/EventFilter.cs
Adds IAsyncMessageFramer and MessageFramingException, updates framing references, and constructs event filters directly during parsing.
TCP protocol and dispatch removal
src/Protos/ClientAPI/ClientMessageDtos.proto, src/EventStore.Core/Messages/*, src/EventStore.Core/Services/Transport/Tcp/*
Removes TCP protobuf contracts, message types, package serialization, dispatchers, connection helpers, and TCP send infrastructure.
Runtime transport and settings removal
src/EventStore.Core/ClusterVNode.cs, src/EventStore.Core/Services/*, src/EventStore.Core/Settings/*, src/EventStore.Core/*.csproj, src/EventStore.Core/NodeTcpOptions.cs, src/EventStore.Core/Util/Opts.cs
Removes TCP listeners, connection handling, TCP statistics, TCP-specific cleanup and policy wiring, TCP settings, and project references. Not-authenticated handling remains on ClientMessage.
TCP test fixture cleanup
src/EventStore.Core.Tests/EventStore.Core.Tests.csproj, src/EventStore.Core.Tests/Services/Transport/Tcp/test_certificates/*
Removes TCP test-project references, embedded certificate resources, certificate files, and certificate-generation scripts.

Priority: ➖ Normal

Estimated code review effort: 5 (Critical) | ~90 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 91fdd

No actionable merge-blocking risk is established for the TCP runtime removal.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: retiring the internal TCP runtime. It is concise and specific.
Description check ✅ Passed The description directly states that the unsupported transport runtime was removed and that the server now uses one internal communication path.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the vanished wire,
The old TCP paths retire,
New framers hold the byte stream tight,
Filters parse with clearer sight,
And test keys fade from light.

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

PR Summary

High Risk
Retires a client transport and changes cluster protobuf field usage, which can break older TCP clients and mixed-version gossip unless rollout is coordinated.

Overview
This PR removes the legacy TCP client protocol and internal TCP endpoints from cluster membership, gossip, and operator surfaces so nodes are addressed via HTTP/gRPC and cluster/replication endpoints only.

Protobuf / wire format: proto.lock drops the entire ClientAPI ClientMessageDtos definition and reserves former TCP-related fields on MemberInfo and LeaderInfo in cluster.proto (internal/external TCP, advertise TCP port, leader external TCP / is_secure). Not-handled leader hints and forwarding tests now carry HTTP-only leader info; auth failures use ClientMessage.NotAuthenticated instead of TcpMessage.

Runtime & UI: The cluster dashboard drops separate TCP columns and maps replica stats to cluster or HTTP endpoints. MemberInfo, VNodeInfo, and gossip advertise types are simplified accordingly (tests updated across elections, gossip, replication, and inauguration).

Tests: Integration and mini-node harnesses no longer spin up the TcpUnitTestPlugin or EventStore.Client TCP connections—gRPC Streams is used instead (including read-only replica rejection tests). Large blocks of ClientAPI TCP test helpers and TCP package unit tests are deleted.

Reviewed by Cursor Bugbot for commit a80b6af. Bugbot is set up for automated code reviews on this repo. Configure here.

@yordis
yordis added this pull request to stack #500 September 12, 2026 23:22
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from f4812a7 to f2d6e6f Compare September 13, 2026 00:15
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from dbf4cb3 to ba04fb5 Compare September 13, 2026 00:15

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from ba04fb5 to 6c0e186 Compare September 13, 2026 00:33
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from f2d6e6f to 053f671 Compare September 13, 2026 00:33
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from 6c0e186 to 1330f22 Compare September 13, 2026 00:58
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from 053f671 to 0f69eed Compare September 13, 2026 00:58
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from 1330f22 to e681f13 Compare September 13, 2026 01:16
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch 2 times, most recently from 0449064 to a1d40ed Compare September 13, 2026 01:31
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch 2 times, most recently from 504ff97 to f9a5f73 Compare September 13, 2026 01:46
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch 2 times, most recently from 44149c6 to c6ac843 Compare September 13, 2026 02:04
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch 2 times, most recently from 07068b1 to f0fb411 Compare September 13, 2026 02:29
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch 2 times, most recently from 3f51781 to efebb69 Compare September 13, 2026 02:59
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from f0fb411 to e243e25 Compare September 13, 2026 02:59

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/EventStore.Core/Services/Storage/ReaderIndex/EventFilter.cs
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from e243e25 to 32b689d Compare September 13, 2026 03:14
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch 2 times, most recently from 4cba08c to e0a1b7b Compare September 13, 2026 03:46
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch 2 times, most recently from 430b47b to 2272c22 Compare September 13, 2026 04:23
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from e0a1b7b to babe9ed Compare September 13, 2026 04:23
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch 2 times, most recently from 6e27bc8 to 7ee7094 Compare September 18, 2026 00:49
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from fe3d65b to 01202d7 Compare September 18, 2026 00:49
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from 7ee7094 to ee40129 Compare September 18, 2026 01:43
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from 01202d7 to 1366384 Compare September 18, 2026 01:43
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from ee40129 to 85eda7b Compare September 20, 2026 07:29
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from 1366384 to 8e4e2a1 Compare September 20, 2026 07:29
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from 85eda7b to 7181489 Compare September 20, 2026 09:21
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch 2 times, most recently from 1183f8d to 5a4468b Compare September 21, 2026 14:14
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from 7181489 to 4836eee Compare September 21, 2026 14:14
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch 2 times, most recently from a415197 to e256169 Compare September 21, 2026 14:29
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from 5b78a59 to e62ef41 Compare September 21, 2026 15:34
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from e256169 to 5fe44c9 Compare September 21, 2026 15:34
@yordis
yordis force-pushed the yordis/feat-grpc-cluster-endpoints branch from e62ef41 to a27c8bd Compare September 21, 2026 17:09

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 973d3cd. Configure here.

Comment thread src/EventStore.ClusterNode/Components/Services/ClusterStatusService.cs Outdated
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant