Skip to content

Commit 370701b

Browse files
Merge pull request #194 from datastax/RUBY-164
RUBY-164 - don't mark host down after receiving a host_down event if …
2 parents bffe1d6 + 247a332 commit 370701b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# master
22
Features:
3+
* Do not mark a host as down if there are active connections.
4+
* Update Keyspace metadata to include collection of indexes defined in the keyspace.
5+
* Update Table metadata to include trigger-collection and view-collection metadata.
36

47
Bug Fixes:
8+
* [RUBY-255](https://datastax-oss.atlassian.net/browse/RUBY-255) ControlConnection.peer_ip ignores peers that are missing critical information in system.peers.
59

610
# 3.0.3
711

lib/cassandra/cluster/control_connection.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ def register_async
229229
refresh_schema_async_wrapper
230230
end
231231
when 'DOWN'
232-
@registry.host_down(event.address)
232+
# RUBY-164: Don't mark host down if there are active connections. We have
233+
# logic in connector.rb to call host_down when all connections to a node are lost,
234+
# so that covers the requirement.
233235
when 'NEW_NODE'
234236
address = event.address
235237

spec/cassandra/cluster/control_connection_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,9 +895,8 @@ def handle_request(&handler)
895895
logger.should have_received(:debug).with(/Event received EVENT STATUS_CHANGE DOWN/)
896896
end
897897

898-
it 'notifies registry' do
899-
ip = address.to_s
900-
expect(cluster_registry).to receive(:host_down).once.with(ip)
898+
it 'does not notify registry' do
899+
expect(cluster_registry).to_not receive(:host_down)
901900
connections.first.trigger_event(event)
902901
end
903902
end

0 commit comments

Comments
 (0)