-
Notifications
You must be signed in to change notification settings - Fork 851
Fix HostDBInfo::is_down condition #12846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a logical error in the HostDBInfo::is_down method where the condition was inverted, causing it to incorrectly determine when a host should be considered down based on its failure window.
Changes:
- Corrected the comparison operator in
is_down()from<to>=to properly check if a host is still within its failure window
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bryancall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make comments, it is confusing
|
Approved. Maybe check with @serrislew and @cmcfarlen as well since it sounds like they looked into this previously. |
|
I wrote comment to clarify. Please take another look. |
|
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 shipping this PR first. |
The condition of
HostDBInfo::is_downseems opposite.This function is only used by
HostDBRecord::select_best_srv(), so only SRV record case is affected.trafficserver/src/iocore/hostdb/HostDB.cc
Lines 1609 to 1611 in 2a30bcc