• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

c-ares / c-ares / #196
92%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2023 10:36PM UTC
Jobs 1
Files 142
Run time 26s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Nov 2023 10:32PM UTC coverage: 82.683% (+0.05%) from 82.635%
#196

push

travis-ci

web-flow
Dynamic Server List (#594)

This PR makes the server list a dynamic sorted list of servers. The sort order is [ consecutive failures, system config index ]. The server list can be updated via ares_set_servers_*(). Any queries currently directed to servers that are no longer in the list will be automatically re-queued to a different server.

Also, any time a failure occurs on the server, the sort order of the servers will be updated so that the one with the fewest consecutive failures is chosen for the next query that goes on the wire, this way bad or non-responsive servers are automatically isolated.

Since the server list is now dynamic, the tracking of query failures per server has been removed and instead is relying on the server sort order as previously described. This simplifies the logic while also reducing the amount of memory required per query. However, because of this dynamic nature, it may not be easy to determine the server attempt order for enqueued queries if there have been any failures.

If using the ARES_OPT_ROTATE, this is now implemented to be a random selection of the configured servers. Since the server list is dynamic, its not possible to go to the next server as configuration could have changed between queries or attempts for the same query.

Finally, this PR moved some existing functions into new files to logically separate them.

This should address issues #550 and #440, while also setting the framework to implement #301. #301 needs a little more effort since it configures things other than the servers themselves (domains, search, sortlist, lookups), which need to make sure they can be safely updated.

Fix By: Brad House (@bradh352)

1131 of 1300 new or added lines in 16 files covered. (87.0%)

10 existing lines in 6 files now uncovered.

6126 of 7409 relevant lines covered (82.68%)

2174.16 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #196.1 03 Nov 2023 10:36PM UTC 0
82.68
Source Files on build #196
Detailed source file information is not available for this build.
  • Back to Repo
  • c8bd83a4 on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc