Skip to content

KNOX-3381: Fix HaDispatch unnecessary failover due to IOException dur…#1308

Merged
hanicz merged 1 commit into
apache:masterfrom
hanicz:KNOX-3381
Jul 20, 2026
Merged

KNOX-3381: Fix HaDispatch unnecessary failover due to IOException dur…#1308
hanicz merged 1 commit into
apache:masterfrom
hanicz:KNOX-3381

Conversation

@hanicz

@hanicz hanicz commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

…ing writeOutboundResponse

KNOX-3381 - HADispatch retries on IOException during writeOutboundResponse

What changes were proposed in this pull request?

Failover dispatches wrapped both the backend call and the response-copy in one try, so an IOException while streaming an already-received response to the client (e.g. a parse/rewrite error) triggered a failover — replaying a request the backend had already served. Split the two phases so only backend-connection failures fail over; response-copy errors now propagate. Applied to ConfigurableHADispatch and the Atlas/NiFi HA dispatches, plus a new test.

Not touching AbstractHdfsHaDispatch in this PR because it fails over on other exceptions as well.

How was this patch tested?

Unit tests, tested locally with custom REST endpoints

Integration Tests

N/A

UI changes

N/A

@github-actions

Copy link
Copy Markdown

Test Results

36 tests   36 ✅  5s ⏱️
 3 suites   0 💤
 3 files     0 ❌

Results for commit e3e7dd4.

@hanicz
hanicz merged commit b438768 into apache:master Jul 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants