mike-lmctl opened a new pull request, #19427:
URL: https://github.com/apache/druid/pull/19427
Fixes #19407.
### Description
This updates `DirectDruidClient` so HTTP error responses with unstructured
bodies, such as Jetty HTML 429/503 pages, are converted into Druid query
exceptions before the response stream reaches the JSON parser.
Structured JSON/Smile error responses still use the existing parsing path.
For unstructured 429/503 responses, the client now reports a query capacity
error since those statuses indicate upstream rate limiting or overload. If
`Content-Type` is missing, the response body is sniffed so JSON-looking error
bodies still take the existing path.
#### Release note
Broker query failures caused by upstream 429/503 HTML error responses now
surface as query capacity errors instead of raw JSON parse errors.
<hr>
##### Key changed/added classes in this PR
* `DirectDruidClient`
* `DirectDruidClientTest`
<hr>
This PR has:
- [x] been self-reviewed.
- [x] a release note entry in the PR description.
- [x] added comments explaining the "why" and the intent of the code
wherever would not be obvious for an unfamiliar reader.
- [x] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold for code coverage is met.
Tested with:
`mvn -pl server -am -Dtest=DirectDruidClientTest
-Dsurefire.failIfNoSpecifiedTests=false test -DskipITs`
Result: 13 tests passed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]