Skip to content

SkipPoolCreation: preserve host UP and DOWN lifecycle processing #1015

Description

@dkropachev

Problem

SkipPoolCreation returns before all host UP and DOWN processing:

def on_up(self, host):
"""
Intended for internal use only.
"""
if self.is_shutdown or self.allow_control_connection_query_fallback == ControlConnectionQueryFallback.SkipPoolCreation:
return

def on_down(self, host, is_host_addition, expect_host_to_be_down=False):
"""
Intended for internal use only.
"""
if self.is_shutdown or self.allow_control_connection_query_fallback == ControlConnectionQueryFallback.SkipPoolCreation:
return

This prevents host status updates, listener notifications, and control-connection failover:

@run_in_executor
def on_down_potentially_blocking(self, host, is_host_addition):
self.profile_manager.on_down(host)
self.control_connection.on_down(host)
for session in tuple(self.sessions):
session.on_down(host)
for listener in self.listeners:
listener.on_down(host)
self._start_reconnector(host, is_host_addition)

Pool creation is already disabled in the session paths:

def add_or_renew_pool(self, host, is_host_addition):
"""
For internal use only.
"""
if self.cluster.allow_control_connection_query_fallback is ControlConnectionQueryFallback.SkipPoolCreation:
return None
distance = self._profile_manager.distance(host)
if distance == HostDistance.IGNORED:
return None

Expected behavior

Continue normal host lifecycle processing in SkipPoolCreation mode while keeping node-pool creation disabled.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions