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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to