joao-r-reis commented on PR #1926:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1926#issuecomment-3760000711

   Most if not all other drivers have a tokenmap structure in the driver itself 
that can be leveraged by the tokenaware policy. This tokenmap has the replica 
metadata for every keyspace (found via a system table query) and it is computed 
every time there is a control connection reconnection, a topology refresh or a 
schema changed event. 
   
   In GoCQL this logic seems to be built into the tokenaware policy itself 
which is fine but it looks like it is only computing replicas for one keyspace 
which is far from ideal. This patch does fix the issue as described but it adds 
a round trip for the first query of each keyspace and at a first glance it 
seems like if a lot of queries go out at the same time for a keyspace that 
doesn't have replicas yet then all of those queries will trigger these extra 
round trips.
   
   I believe the correct solution would be to fetch the list of keyspaces and 
update the replicas for all keyspaces where currently this is being done just 
for a single keyspace instead of trying to compute replicas on the fly when a 
request has already been submitted to the driver.


-- 
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]

Reply via email to