worryg0d commented on issue #1918:
URL: 
https://github.com/apache/cassandra-gocql-driver/issues/1918#issuecomment-3884672192

   Thanks for sharing it. I think this is correct, ' tokenAwareHostPolicy' 
indeed queries the keyspace metadata for `tokenAwareHostPolicy.AddHost()` and 
`tokenAwareHostPolicy.AddHosts()` before updating `useSystemSchema`. We don't 
see an error returned by `getKeyspaceMetadata()` in 
[tokenAwareHostPolicy.updateReplicas()](https://github.com/apache/cassandra-gocql-driver/blob/d7df11b840781b69950549e22c8b095da4c265e0/policies.go#L471-L479)
 because it is ignored.
   
   Moving the schema version check right after the control connection 
establishment (line 264) fixes the issue. `checkSystemSchema` relies on the 
control connection and doesn't call policy to pick a host, so it should be safe
   
   


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