dkropachev commented on code in PR #1794:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1794#discussion_r1713644935


##########
metadata.go:
##########
@@ -269,6 +307,23 @@ func (s *schemaDescriber) getSchema(keyspaceName string) 
(*KeyspaceMetadata, err
        return metadata, nil
 }
 
+// returns the cached VirtualKeyspaceMetadata held by the describer for the 
named
+// keyspace.
+func (s *virtualSchemaDescriber) getSchema(keyspaceName string) 
(*VirtualKeyspaceMetadata, error) {
+       s.mu.Lock()
+       defer s.mu.Unlock()
+       metadata, found := s.cache[keyspaceName]

Review Comment:
   If you clear cache a the betting of `getSchema` it means that there is going 
to be no cache, why just not drop it.
   If you drop the cache then there is no point in having 
`virtualSchemaDescriber`, you can just move code to `Session`.



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