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


##########
metadata.go:
##########
@@ -475,14 +493,32 @@ func refreshSchemas(session *Session) error {
        } else {
                for _, createdKeyspace := range newKeyspaces {
                        
session.policy.KeyspaceChanged(KeyspaceUpdateEvent{Keyspace: createdKeyspace, 
Change: SchemaChangeTypeCreated})
+                       if session.keyspaceChangeListener != nil && 
session.initialized() {
+                               
session.keyspaceChangeListener.OnKeyspaceCreated(KeyspaceCreatedEvent{Keyspace: 
keyspaceMeta[createdKeyspace]})
+                       }
                }
                for _, droppedKeyspace := range droppedKeyspaces {
                        
session.policy.KeyspaceChanged(KeyspaceUpdateEvent{Keyspace: droppedKeyspace, 
Change: SchemaChangeTypeDropped})
+                       if session.keyspaceChangeListener != nil && 
session.initialized() {
+                               
session.keyspaceChangeListener.OnKeyspaceDropped(KeyspaceDroppedEvent{Keyspace: 
oldKeyspaceMeta[droppedKeyspace]})
+                       }
                }
                for _, updatedKeyspace := range updatedKeyspaces {
                        
session.policy.KeyspaceChanged(KeyspaceUpdateEvent{Keyspace: updatedKeyspace, 
Change: SchemaChangeTypeUpdated})
+                       if session.keyspaceChangeListener != nil && 
session.initialized() {
+                               
session.keyspaceChangeListener.OnKeyspaceUpdated(KeyspaceUpdatedEvent{

Review Comment:
   This name is very similar to the old `KeyspaceUpdateEvent` type that is 
being used in `HostSelectionPolicy`, it would be great if we could 
differentiate this name a little more so small typos don't lead to frustration 



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