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

HostFilter Not Used for Control Connection #1723

Open
amcrn opened this issue Sep 14, 2023 · 0 comments · May be fixed by #1724
Open

HostFilter Not Used for Control Connection #1723

amcrn opened this issue Sep 14, 2023 · 0 comments · May be fixed by #1724

Comments

@amcrn
Copy link

amcrn commented Sep 14, 2023

What version of Cassandra are you using?

Reproducible on 3.x & 4.x

What version of Gocql are you using?

v1.6.0

What version of Go are you using?

1.20

What did you do?

The HostFilter is not being used for the Control Connection (aka
the controlConn). This can be problematic, especially if the host
is being filtered due to it being in a bad state, as it can hold up
the creation of the Control Connection (and therefore the Session
itself) for quite some time.

What did you expect to see?

Hosts filtered by a HostFilter are not eligible to be used in the
Control Connection.

What did you see instead?

The opposite.

Note: This also fixes an issue if disableControlConn=true and/or DisableInitialHostLookup=true, where the Ring is updated with the host, prior to filtering:

gocql/session.go

Lines 265 to 268 in db6d556

host := s.ring.addOrUpdate(host)
if s.cfg.filterHost(host) {
continue
}

@amcrn amcrn linked a pull request Sep 14, 2023 that will close this issue
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 a pull request may close this issue.

1 participant