Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
avelanarius opened this issue Mar 4, 2024 · 0 comments
Labels
bug Something isn't working upstream-issue Issue is not specific to our fork and Scylla and should be also fixed in the upstream

Comments

@avelanarius
Copy link

avelanarius commented Mar 4, 2024

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).

@Lorak-mmk Lorak-mmk added bug Something isn't working upstream-issue Issue is not specific to our fork and Scylla and should be also fixed in the upstream labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream-issue Issue is not specific to our fork and Scylla and should be also fixed in the upstream
Projects
None yet
Development

No branches or pull requests

2 participants