Skip to content

Cluster.refresh_nodes immediately throws exception if control connection is down  #307

Open
@avelanarius

Description

@avelanarius

As reported in scylladb/scylladb#17616, when a user calls Cluster's refresh_nodes() while the control connection is down, refresh_nodes() will fail with an exception:

cassandra.DriverException: Node list was not refreshed. See log for details.

As also suggested in #273, maybe the default behavior of the driver should be to wait for the (control) connection to come back instead of failing immediately.

Such a behavior should have some (configurable?) timeout to avoid waiting for an infinity. For this particular usecase, it might be an overkill to introduce a retry mechanism for this specific method.

Another "solution" to the problem would be to better signal to the driver users that this function can throw - or maybe redesign it to return a boolean (or some more detailed type) whether the operation succeed or failed - it would be the responsibility of the user to retry it (and the user would be more aware of this fact).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstream-issueIssue is not specific to our fork and Scylla and should be also fixed in the upstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions