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


##########
control.go:
##########
@@ -364,6 +364,13 @@ func (c *controlConn) setupConn(conn *Conn, sessionInit 
bool) error {
                NewLogFieldIP("host_addr", host.ConnectAddress()), 
NewLogFieldString("host_id", host.HostID()))
 
        if c.session.initialized() {
+               refreshErr := c.session.schemaDescriber.refreshSchemaMetadata()
+               if refreshErr != nil {
+                       c.session.logger.Warning("Failed to refresh schema 
metadata after reconnecting. "+
+                               "Schema might be stale or missing, causing 
token-aware routing to fall back to the configured fallback policy. "+
+                               "Keyspace metadata queries will fail with 
ErrKeyspaceDoesNotExist until schema refresh succeeds.",

Review Comment:
   `"Keyspace metadata queries will fail with ErrKeyspaceDoesNotExist until 
schema refresh succeeds."` 
   
   might fail but not guaranteed because it will depend on whether any prior 
refreshes were successful.
   
   ```
   "Failed to refresh schema metadata after reconnecting. Schema metadata might 
be stale or missing. If it's missing then it will cause token-aware policies to 
fall back to the configured fallback policy and keyspace metadata queries will 
fail with ErrKeyspaceDoesNotExist until schema refresh succeeds."
   ```



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