masaori335 opened a new pull request, #13102:
URL: https://github.com/apache/trafficserver/pull/13102
# Summary
We have three configs of connect attempt retry. However, prior to the
change, none of them are implemented correctly. This PR makes the retry path
honor the HostDBInfo state across the board.
- `connect_attempts_max_retries`
- `connect_attempts_max_retries_down_server`
- `connect_attempts_rr_retries`
# Changes
- New helper
`HttpTransact::origin_server_connect_attempts_max_retries(State*)` returns the
retry limit based on the active `HostDBInfo::State` :
- UP → `connect_attempts_max_retries`
- SUSPECT → `connect_attempts_max_retries_down_server`
- DOWN → 0
- `HttpTransact::handle_response_from_server` is refactored and retry logic
is fixed.
- Fix round-robin logic in `ResolveInfo::select_next_rr(now, fail_window)`
- `HttpSM::mark_host_failure` now uses
`origin_server_connect_attempts_max_retries(s) + 1` as the DOWN threshold (was
incorrectly using `connect_attempts_rr_retries`).
- `HttpSM::do_hostdb_update_if_necessary` records failure time via
`ts_clock::now()` instead of `client_request_time` so multiple connect attempts
in one transaction get distinct timestamps.
# Tests
1. New `connect_attempts_single_max_retries.replay.yaml` exercises
`connect_attempts_max_retries` and `connect_attempts_max_retries_down_server`
for single DNS Record (no round-robin case)
2. Updated connect_attempts_rr_retries.replay.yaml and gold files to reflect
the corrected RR + SUSPECT behavior.
3. Updated connect_attempts_rr_max_retries gold to match the new state-aware
fail-count threshold.
# Dependency
This PR is in draft until below PRs are merged.
- #13083
- #13092
--
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]