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
{{ message }}
Repository navigation
GH-50282: [C++][FlightRPC] Refactor GRPC server and transport classes - #50407
The goal of the pullrequest is to refactor the FligtRPC code to prepare the async implementation. I moved code from grpc_server and transport_server to the _internal files which will be used in both sync and async server implmentations.
I also created dedicated function for specific responsabilities and reduce code complexity or duplication.
Alex-PLACET
changed the title
GH-#50282: [C++][FlightRPC] Refactor GRPC server and transport classes
GH-50282: [C++][FlightRPC] Refactor GRPC server and transport classes
Jul 7, 2026
The reason will be displayed to describe this comment to others. Learn more.
We should probably bump ARROW_GRPC_REQUIRED_VERSION. I am pretty sure if Ubuntu 22.04 ships older GRPC than necessary, we will also have to update the Linux Package jobs (.deb) for old ubuntu (potentially also for old Red Hat?), I'll kick off Linux Packages.
The reason will be displayed to describe this comment to others. Learn more.
The point was I got some issue with protobuf and I though it was because of a mess with with FlightPayload. I think I introduce an issue at some point it fixed it later in my development. I just removed this mechanism as it is useless now.
The reason will be displayed to describe this comment to others. Learn more.
nit: it might make a little more sense for this to parse a URI and return the creds/location/address instead of just taking a builder, in case we want to unit test this later
- Add Location::uri() and Location::port() and update FlightServerBase::port() to return arrow::Result<int>.
- Remove ParseLocationUri/PortFromLocation and use Location methods instead.
- Remove ServerTransportBase; store MemoryManager on ServerTransport and adjust ctor.
- Make WriteDataStream a free function (transport_server_internal).
- Introduce GrpcServerEndpoint and ParseServerEndpoint (address + credentials + location) and update gRPC server startup to use it.
- Update related headers and implementations to match the new internal API.
Uri::port() returns -1 when the URI has no port, so this implementation returns a successful Result containing -1 for locations such as grpc+unix. That contradicts the new FlightServerBase::port() contract, which promises an error when the port cannot be determined; convert the no-port sentinel to an error here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal of the pullrequest is to refactor the FligtRPC code to prepare the async implementation. I moved code from grpc_server and transport_server to the _internal files which will be used in both sync and async server implmentations.
I also created dedicated function for specific responsabilities and reduce code complexity or duplication.