Skip to content

refactor(datafusion-flight-sql-server): remove tokio-stream listener … - #58

Merged
hozan23 merged 1 commit into
datafusion-contrib:mainfrom
cloneyate:main
Aug 5, 2026
Merged

refactor(datafusion-flight-sql-server): remove tokio-stream listener …#58
hozan23 merged 1 commit into
datafusion-contrib:mainfrom
cloneyate:main

Conversation

@cloneyate

Copy link
Copy Markdown
Contributor

Summary

  • Update serve_with_listener to use tonic's TcpIncoming.
  • Preserve the same TCP behavior as serve, including enabling TCP_NODELAY on accepted connections.
  • Add a generic serve_with_incoming API for caller-provided incoming streams and custom transport configuration.
  • Remove the direct tokio-stream dependency.

Motivation

The previous serve_with_listener implementation used TcpListenerStream, bypassing tonic's accepted-socket configuration. In particular, TCP_NODELAY was
not enabled, unlike the standard serve path. This could introduce Nagle/delayed-ACK latency for Flight SQL workloads.

Using TcpIncoming keeps serve_with_listener consistent with serve, while serve_with_incoming supports broader use cases such as custom TCP settings,
connection wrappers, TLS transports, and alternative incoming streams.

…wrapper

Introduce a generic `serve_with_incoming` entrypoint and route the
listener-based server startup through tonic's `TcpIncoming`. This keeps
the existing listener API intact while dropping the direct
`tokio-stream` dependency and reducing the server's wrapper glue.
@hozan23

hozan23 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Thanks @cloneyate

@hozan23
hozan23 merged commit e5c4871 into datafusion-contrib:main Aug 5, 2026
7 checks passed
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.

2 participants