raj14243 opened a new pull request, #1926: URL: https://github.com/apache/cassandra-gocql-driver/pull/1926
When a session is created with one keyspace but queries are executed against a different keyspace (using keyspace.table syntax), the TokenAwareHostPolicy routes queries only to the primary replica and ignores ShuffleReplicas() setting because replica maps are only populated for the session's default keyspace. This causes hotspotting and reduced load distribution across the cluster for multi-keyspace workloads. This change implements lazy loading of replica maps in the Pick() method. When replicas are not found for a keyspace, the ensureReplicasForKeyspace() method is called to populate them on-demand using the session's existing KeyspaceMetadata capability. patch by Raj Ummadisetty for CASSGO-104 -- 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]

