OleksiienkoMykyta commented on issue #1319:
URL:
https://github.com/apache/cassandra-gocql-driver/issues/1319#issuecomment-2674211821
DCAwareRoundRobinPolicy host selection policy prioritizes nodes in the local
data center (DC) for query execution. By default, if you don't specify a local
datacenter name when creating this policy, it will attempt to automatically
detect the local datacenter based on the connected nodes' metadata.
To set it you will do something like
```
cluster := gocql.NewCluster("192.168.XX.XX", "192.168.XX.XX",
"192.168.XX.XX")
cluster.PoolConfig.HostSelectionPolicy = gocql.DCAwareRoundRobinPolicy("dc1")
```
More detail provided at https://pkg.go.dev/github.com/gocql/gocql
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]