Skip to content

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

Open
yordis wants to merge 1 commit into
yordis/feat-grpc-cluster-endpointsfrom
yordis/chore-remove-legacy-tcp-runtime
Open

yordis wants to merge 1 commit into
yordis/feat-grpc-cluster-endpointsfrom
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 Change StackReview Change Stack

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 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/chore-remove-legacy-tcp-runtime

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
Drops the TCP wire protocol and related auth/forwarding/subscription lifecycle behavior—a breaking change for TCP clients and a large deletion across core messaging.

Overview
Removes the legacy TCP client transport from the server so client and internal paths no longer depend on EventStore.Transport.Tcp, the Client API protobuf DTOs, or the large Services/Transport/Tcp stack (listeners, connection managers, dispatchers, TcpMessage bus types).

Project and wiring cleanup: EventStore.Core and tests drop references to EventStore.Transport.Tcp and ClientMessageDtos.proto; TCP test certs and embedded resources go away. ClusterVNode stops subscribing TCP auth/not-handled messages to request forwarding; subscriptions/persistent subscriptions no longer tear down clients on TcpMessage.ConnectionClosed. Monitoring drops proc-tcp-* stats; legacy auth drops Operations.Node.Statistics.Tcp. NotHandled.LeaderInfo is HTTP-only (TCP leader hints removed).

Replication still frames bytes: framing types move into EventStore.Core.Helpers (IAsyncMessageFramer, MessageFramingException) and replication framers use those instead of the TCP package. Event filters parse prefix/regex without the removed Client.Messages.Filter protobuf types.

Reviewed by Cursor Bugbot for commit 91fdde0. 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

@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/chore-remove-legacy-tcp-runtime branch from f2d6e6f to 053f671 Compare September 13, 2026 00:33
@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/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/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/chore-remove-legacy-tcp-runtime branch 2 times, most recently from 3f51781 to efebb69 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.

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 efebb69. Configure here.

Comment thread src/EventStore.Core/Services/Storage/ReaderIndex/EventFilter.cs
@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/chore-remove-legacy-tcp-runtime branch from e0a1b7b to babe9ed Compare September 13, 2026 04:23
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from babe9ed to c231f5b Compare September 13, 2026 06:04
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from c231f5b to 87682eb Compare September 13, 2026 18:21
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/chore-remove-legacy-tcp-runtime branch from 87682eb to 91fdde0 Compare September 13, 2026 21:00
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