You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "masaori335 (via GitHub)" <gi...@apache.org> on 2026/02/02 01:50:19 UTC
[PR] Fix HostDBInfo::is_down condition [trafficserver]
masaori335 opened a new pull request, #12846:
URL: https://github.com/apache/trafficserver/pull/12846
The condition of `HostDBInfo::is_down` seems opposite.
This function is only used by `HostDBRecord::select_best_srv()` , so only SRV record case is affected.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix HostDBInfo::is_down condition [trafficserver]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #12846:
URL: https://github.com/apache/trafficserver/pull/12846#discussion_r2756337961
##########
include/iocore/hostdb/HostDBProcessor.h:
##########
@@ -233,7 +233,7 @@ inline bool
HostDBInfo::is_down(ts_time now, ts_seconds fail_window)
{
auto last_fail = this->last_fail_time();
- return (last_fail != TS_TIME_ZERO) && (last_fail + fail_window < now);
+ return (last_fail != TS_TIME_ZERO) && (last_fail + fail_window >= now);
Review Comment:
The logic change in `is_down()` inverts the condition's behavior, which could significantly impact SRV record selection. This critical behavioral change should be covered by tests to verify that hosts within the failure window are correctly identified as down, and hosts outside the window are considered up.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix HostDBInfo::is_down condition [trafficserver]
Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 commented on PR #12846:
URL: https://github.com/apache/trafficserver/pull/12846#issuecomment-3838407824
I wrote comment to clarify. Please take another look.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix HostDBInfo::is_down condition [trafficserver]
Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 commented on PR #12846:
URL: https://github.com/apache/trafficserver/pull/12846#issuecomment-3838422823
I talked with @serrislew and @cmcfarlen, we found her patch has almost the same change in this function with other changes. And we agreed with ship this change first.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix HostDBInfo::is_down condition [trafficserver]
Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 merged PR #12846:
URL: https://github.com/apache/trafficserver/pull/12846
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix HostDBInfo::is_down condition [trafficserver]
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on PR #12846:
URL: https://github.com/apache/trafficserver/pull/12846#issuecomment-3837688604
Approved. Maybe check with @serrislew and @cmcfarlen as well since it sounds like they looked into this previously.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org