Github user SolidWallOfCode commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/234#discussion_r33326221 --- Diff: iocore/hostdb/I_HostDBProcessor.h --- @@ -254,6 +254,41 @@ struct HostDBInfo { uint64_t md5_high; + /* + * Given the current time `now` and the fail_window, determine if this real is alive + */ + bool + alive(ink_time_t now, int32_t fail_window) + { + unsigned int last_failure = app.http_data.last_failure; + + if (last_failure == 0 || (unsigned int)(now - fail_window) > last_failure) { + return true; + } else { + // Entry is marked down. Make sure some nasty clock skew + // did not occur. Use the retry time to set an upper bound + // as to how far in the future we should tolerate bogus last + // failure times. This sets the upper bound that we would ever + // consider a server down to 2*down_server_timeout + if (now + fail_window < (int32_t)(last_failure)) { --- End diff -- I would think `now + fail_window < last_failure` - why cast this? You're losing a whole lot of time data.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---