-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the Trino client spooling protocol #496
base: master
Are you sure you want to change the base?
Conversation
8ac3e6d
to
2dc1909
Compare
Currently tests are failing because of trinodb/trino#24226 |
2dc1909
to
6ec4713
Compare
6ec4713
to
d7f4ee3
Compare
d7f4ee3
to
6dd0ee6
Compare
Can we skip this one failing test for now? |
6dd0ee6
to
f9f2825
Compare
2bf6201
to
992e25c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM except for decoding logic that needs to be improved
tests/development_server.py
Outdated
.with_volume_mapping(str(root / "etc/catalog"), "/etc/trino/catalog") | ||
|
||
# Enable spooling config | ||
if TRINO_VERSION >= "466": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;-)
@@ -37,6 +37,7 @@ | |||
HEADER_CLIENT_TAGS = "X-Trino-Client-Tags" | |||
HEADER_EXTRA_CREDENTIAL = "X-Trino-Extra-Credential" | |||
HEADER_TIMEZONE = "X-Trino-Time-Zone" | |||
HEADER_ENCODING = "X-Trino-Query-Data-Encoding" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should document that somewhere @wendigo .. dev guide in trino docs maybe?
992e25c
to
5066858
Compare
5066858
to
e01887b
Compare
e01887b
to
2a98915
Compare
@mdesmet this is a good direction, the only comment I have is that the spooled segment data is resolved eagerly, I think that data fetch should happen in the |
Actually it is not eagerly fetched. with Following section in
|
LGTM |
2a98915
to
75a9e43
Compare
Only remaining issue is making the acknowledge executed in a background thread. |
@mdesmet please rebase, how is the async ack going? |
75a9e43
to
6431e2f
Compare
def acknowledge_request(): | ||
try: | ||
http_response = self._send_spooling_request(self.ack_uri, timeout=2) | ||
if not http_response.ok: | ||
self._request.raise_response_error(http_response) | ||
except Exception as e: | ||
logger.error(f"Failed to acknowledge spooling request for segment {self}: {e}") | ||
# Start the acknowledgment in a background thread | ||
thread = threading.Thread(target=acknowledge_request, daemon=True) | ||
thread.start() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wendigo : apparently I didn't push my latest changes. Here is the async impl.
6431e2f
to
5e38da4
Compare
5e38da4
to
d1b43e4
Compare
@mdesmet you can run tests on 467 and drop the last commit |
Description
Non-technical explanation
Release notes
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(*) Release notes are required, with the following suggested text:
* Add support for the Trino client spooling protocol