[
https://issues.apache.org/jira/browse/TS-3720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602344#comment-14602344
]
ASF GitHub Bot commented on TS-3720:
------------------------------------
Github user jacksontj commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/234#discussion_r33326252
--- 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 --
No idea TBH, just copy/pasted ;) I'll remove the cast
> HostDB no longer keeps track of host failures
> ---------------------------------------------
>
> Key: TS-3720
> URL: https://issues.apache.org/jira/browse/TS-3720
> Project: Traffic Server
> Issue Type: Bug
> Affects Versions: 5.3.0, 6.0.0
> Reporter: Thomas Jackson
> Assignee: Thomas Jackson
>
> If ATS's DNS response was N A records, and one is unavailable ATS will always
> send traffic to the down real irregardless of configuration. This bug seems
> to be due to how hostdb is keeping track of DNS + health of the real.
> Regression was introduced in https://issues.apache.org/jira/browse/TS-3237
> (https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=a8d1862).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)