[
https://issues.apache.org/jira/browse/KNOX-3381?focusedWorklogId=1030903&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1030903
]
ASF GitHub Bot logged work on KNOX-3381:
----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Jul/26 10:52
Start Date: 17/Jul/26 10:52
Worklog Time Spent: 10m
Work Description: github-actions[bot] commented on PR #1308:
URL: https://github.com/apache/knox/pull/1308#issuecomment-5002406127
## Test Results
36 tests 36 ✅ 5s ⏱️
3 suites 0 💤
3 files 0 ❌
Results for commit e3e7dd4a.
[test-results]:data:application/gzip;base64,H4sIAGYJWmoC/12Myw7CIBBFf6Vh7UKnBdSfMTgDycS2GB6rxn8XUbF1d8+5yVmE49FGce76XSdi5tSAcjCJ/VxQFixHqpf6wiVmxD9z43sx+yac4XEjbAg+fEzIcyu+9ib4Fr9e5VWu8rqGfpo4FRC2t5poMIfhpBzqqwJCR4AGjwCSnLZgiCSIxxPhYJJx/wAAAA==
Issue Time Tracking
-------------------
Worklog Id: (was: 1030903)
Time Spent: 20m (was: 10m)
> HADispatch retries on IOException during writeOutboundResponse
> --------------------------------------------------------------
>
> Key: KNOX-3381
> URL: https://issues.apache.org/jira/browse/KNOX-3381
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 2.1.0
> Reporter: Tamás Hanicz
> Assignee: Tamás Hanicz
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> HADispatch fails over on IOExceptions thrown while writing the response, not
> just on connection failures
> ConfigurableHADispatch.executeRequest(...) wraps both the backend call and
> the response-writing in a single try/catch and triggers failover on any
> IOException:
> {code:java}
> try {
> inboundResponse = executeOutboundRequest(outboundRequest);
> writeOutboundResponse(outboundRequest, inboundRequest, outboundResponse,
> inboundResponse); // stream/rewrite body to client
> } catch (IOException e) {
> if (!isConnectionError(e.getCause()) &&
> isNonIdempotentAndNonIdempotentFailoverDisabled(outboundRequest)) {
> ...
> throw e;
> } else {
> failoverRequest(outboundRequest, inboundRequest, outboundResponse,
> inboundResponse, e);
> }
> }{code}
>
> Failover is only meant to occur when Knox cannot get a response from a
> backend (connection-level errors — UnknownHostException,
> NoRouteToHostException, SocketException, ConnectTimeoutException). However,
> because writeOutboundResponse(...) is inside the same try block, an
> IOException raised after a response has already been received — e.g. while
> streaming or rewriting the response body — also lands in the catch and
> triggers failover.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)