You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Cassandra are you using?
any
What version of Gocql are you using?
v1.6.0
What version of Go are you using?
1.22
What did you do?
My cluster is hidden behind proxy, all nodes are mapped to one address, but different ports.
For this purpose i have use custom AddressTranslator that maps broadcase_address of nodes nodes to host+port of the proxy.
As result I end-up with only one node in the roundRobinHostPolicy.hosts pool and if this node is one that does not work, then I get ErrNoConnections after first retry.
What did you expect to see?
Everything works as supposed to
What did you see instead?
ErrNoConnections
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
What version of Cassandra are you using?
any
What version of Gocql are you using?
v1.6.0
What version of Go are you using?
1.22
What did you do?
My cluster is hidden behind proxy, all nodes are mapped to one address, but different ports.
For this purpose i have use custom
AddressTranslator
that mapsbroadcase_address
of nodes nodes to host+port of the proxy.It works great, but unfortunately if one node goes down I begin experiencing queries returning
ErrNoConnections
.Source of the problem is the following, when nodes are being added to the
roundRobinHostPolicy
:https://github.com/gocql/gocql/blob/6d279ed01c1069d14420584f3f7d5bc1794cf804/policies.go#L331-L333
It uses
cowHostList.add
to do the job, which does deduplication viaHostInfo.Equal
:https://github.com/gocql/gocql/blob/6d279ed01c1069d14420584f3f7d5bc1794cf804/policies.go#L50-L60
Which relies on
h.ConnectAddress().Equal(host.ConnectAddress())
:https://github.com/gocql/gocql/blob/6d279ed01c1069d14420584f3f7d5bc1794cf804/host_source.go#L135-L142
As result I end-up with only one node in the
roundRobinHostPolicy.hosts
pool and if this node is one that does not work, then I getErrNoConnections
after first retry.What did you expect to see?
Everything works as supposed to
What did you see instead?
ErrNoConnections
The text was updated successfully, but these errors were encountered: