Skip to content

Fix canceled federated SERVICE queries wedging dataset (GH-3837)#3847

Closed
utafrali wants to merge 1 commit intoapache:mainfrom
utafrali:fix/issue-3837-fuseki-6-0-0-canceled-federated-service-
Closed

Fix canceled federated SERVICE queries wedging dataset (GH-3837)#3847
utafrali wants to merge 1 commit intoapache:mainfrom
utafrali:fix/issue-3837-fuseki-6-0-0-canceled-federated-service-

Conversation

@utafrali
Copy link
Copy Markdown

@utafrali utafrali commented Apr 8, 2026

Fixes #3837

When a federated SERVICE query gets canceled, the old code still tried to drain the response body on close. This caused the HTTP client to wait for the full response even though the query was aborted, which could wedge the connection and lock up the target dataset.

The fix adds an isAborted check in closeRetainedConnection(). If the query was canceled, we just cancel the future and close the connection without trying to read the response. Otherwise, we use the original logic to drain the body before reusing the connection.

Added a test case to verify that aborted queries don't hang on close.

When a federated SERVICE query gets canceled, the old code still tried to
drain the response body on close. This caused the HTTP client to wait for
the full response even though the query was aborted, which could wedge the
connection and lock up the target dataset.

Add isAborted check in closeRetainedConnection() to skip draining when
the query was canceled. Also add test case to verify aborted queries
don't hang on close.
@utafrali
Copy link
Copy Markdown
Author

gonna close this for now, doesn't seem like it's needed anymore

@utafrali utafrali closed this Apr 10, 2026
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.

Fuseki 6.0.0: canceled federated SERVICE queries can wedge the target dataset until restart

1 participant