From 63b8d8fce892ee65c85af13196b3a0d411ada7eb Mon Sep 17 00:00:00 2001 From: Keith Wansbrough Date: Mon, 25 Nov 2019 15:22:09 +0000 Subject: [PATCH] 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. --- CHANGELOG.md | 7 +++++++ src/request_processor.cpp | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09b45c3d7..c66f484ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Unreleased +=========== + +Bug Fixes +-------- +* Allow remote hosts to come back up even if policy ignores down hosts + 2.14.0 =========== diff --git a/src/request_processor.cpp b/src/request_processor.cpp index e0d8d326d..9132e6f23 100644 --- a/src/request_processor.cpp +++ b/src/request_processor.cpp @@ -462,9 +462,7 @@ void RequestProcessor::internal_host_ready(const Host::Ptr& host) { LoadBalancingPolicy::Vec policies = load_balancing_policies(); for (LoadBalancingPolicy::Vec::const_iterator it = policies.begin(); it != policies.end(); ++it) { - if ((*it)->distance(host) != CASS_HOST_DISTANCE_IGNORE) { - (*it)->on_host_up(host); - } + (*it)->on_host_up(host); } } }