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


##########
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:
   I agree with your point about invalidation, but virtual metadata is only 
requested on the user's purpose, not by some node event, also virtual tables 
can't be changed, if we talk about some `schemaAgreement` case. In my opinion, 
it is unnecessary to invalidate it on every `getSchema` request, and i think it 
is unnecessary to remove a control connection, it is good to keep the existing 
pattern of the metadata requests.



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