Introduced includeTrailerHeader to enable TrailerHeaders in response#16672
Conversation
…nse. If enabled, a header `X-Error-Message` will be added to indicate partial results.
|
You may want to look into an old PR of mine (now stale) - #13492 - The solution in the PR stopped working after query resources were refactored and I didn't get the time to dig into the reason. But given you are in this area, maybe you can explore that patch. |
Thanks @abhishekagarwal87 for your comment. |
|
While it's not straightforward to resolve the query result truncation issue, this solution is aimed at highlighting when results are truncated and helping to identify the reason. The rationale is pretty legit - we don't want to truncate the query results silently. @vivek807, could you please revert the formatting changes in the documentation? |
Updated, thanks @nozjkoitop |
abhishekagarwal87
left a comment
There was a problem hiding this comment.
thanks. I have some comments and yet to go over the test code. Is the test code based on some existing tests?
Updated docs and unit tests.
…ler-headers-to-indicate-truncated-results # Conflicts: # server/src/test/java/org/apache/druid/server/QueryResourceTest.java
…ler-headers-to-indicate-truncated-results
|
@vivek807 I was trying out this change. I was able to see this header only if I was directly hitting the broker. Hitting the router (that is, |
@adarshsanjeev, Apologies for the delayed response—I somehow missed your comment. After a quick review, it appears that Jetty’s AsyncProxyServlet does not inherently support forwarding trailers in the HTTP/1.1 or HTTP/2 Trailer field. I’ll investigate further to see if this can be addressed. |
Introduced
includeTrailerHeaderto enableTrailerHeadersin responseIf enabled, a header
X-Error-Messagewill be added to indicate reasons for partial results.Description
Currently, when requesting large amounts of data, the result may be truncated due to query timeouts or other issues. To address this, we are using a non-standard solution.
To handle this in a standard way, we can implement a trailer header that indicates partial results and the reason for the truncation.
This PR has: