worryg0d commented on PR #1929:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1929#issuecomment-3897361289

   > the ADDED event would have been sent previously when the node was added to 
the ring even before the connection attempt
   
   Yes, that I was thinking about: ADDED should bubble when a node is added to 
the driver ring.
   
   > I didn't check if the order looks like this exactly in gocql but the point 
still stands that it's two different things. In the java driver DOWN/UP is only 
determined by whether the driver has opened connections (pool or control).
   
   Thanks, it clarifies things :+1: 
   
   > Technically it shouldn't happen because we subscribe these events only on 
the control connection
   
   Oh, that's right. Currently, it never happens. Missed this
   
   > but one of the benefits of this is that we can guarantee to the user that 
they will get events for every schema change even if the control connection is 
disconnected during such change. Example:
   1 - Control connection initializes
   2 - Control connection fetches schema metadata
   3 - Connection is closed and has to be reconnected
   4 - Schema change happens while the control connection is disconnected
   5 - Control connection reconnects, fetches metadata again
   6 - Compute diff compared to old metadata and generate user events 
accordingly (we never received a C* event for the schema change that happened 
in step 4)
   
   To achieve this, we can refresh the metadata cache on connection and 
reconnection of the `controlConn`. At this moment, gocql doesn't check if the 
driver


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