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

Fix ErrNoConnections from defaultConnectionPicker.Remove code #257

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

glutamatt
Copy link

i use this driver to interact with an apache Cassandra cluster : the defaultConnPicker is used

the application queries eventually fail with the error ErrNoConnections, without any recovery

all connPicker connections eventually are set to nil by handling of sporadic network errors over time:

  • Conn.closeWithError (code)
  • hostConnPool.HandleError (code)
  • defaultConnPicker.Remove (code)

the query executor loop over nil connections , and the recovery ( pool filling ) does not occur because the pool is full of connections

the old implementation of hostPool, before connPicker , actually remove the failed connection and shorten the slice of connections

i propose the patch to the upstream (i already patched the fork i use in my production code)

@dkropachev dkropachev self-requested a review September 9, 2024 15:50
@dkropachev dkropachev self-assigned this Sep 9, 2024
@dkropachev dkropachev merged commit bed2d7e into scylladb:master Sep 9, 2024
1 check passed
@dkropachev
Copy link
Collaborator

i use this driver to interact with an apache Cassandra cluster : the defaultConnPicker is used

the application queries eventually fail with the error ErrNoConnections, without any recovery

all connPicker connections eventually are set to nil by handling of sporadic network errors over time:

  • Conn.closeWithError (code)
  • hostConnPool.HandleError (code)
  • defaultConnPicker.Remove (code)

the query executor loop over nil connections , and the recovery ( pool filling ) does not occur because the pool is full of connections

the old implementation of hostPool, before connPicker , actually remove the failed connection and shorten the slice of connections

i propose the patch to the upstream (i already patched the fork i use in my production code)

Thanks @glutamatt for your contribution.

@glutamatt glutamatt deleted the fix-connection-picker branch September 9, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants