Skip to content

Commit 63b8d8f

Browse files
committed
Allow remote hosts to come back up
When a host comes back up after being down, a request processor (unlike a control connection) only notifies the load balancing policy if the host is not ignored. Sadly some policies ignore remote hosts that are down. In combination, this means that remote hosts can never be used by a request (processor) after having once gone down. This fix resolves this, by always notifying a policy of all host-up events, regardless of the distance of that host.
1 parent 58c17d1 commit 63b8d8f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Unreleased
2+
===========
3+
4+
Bug Fixes
5+
--------
6+
* Allow remote hosts to come back up even if policy ignores down hosts
7+
18
2.14.0
29
===========
310

src/request_processor.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,7 @@ void RequestProcessor::internal_host_ready(const Host::Ptr& host) {
462462
LoadBalancingPolicy::Vec policies = load_balancing_policies();
463463
for (LoadBalancingPolicy::Vec::const_iterator it = policies.begin(); it != policies.end();
464464
++it) {
465-
if ((*it)->distance(host) != CASS_HOST_DISTANCE_IGNORE) {
466-
(*it)->on_host_up(host);
467-
}
465+
(*it)->on_host_up(host);
468466
}
469467
}
470468
}

0 commit comments

Comments
 (0)