worryg0d commented on code in PR #1822:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1822#discussion_r1803461563


##########
conn.go:
##########
@@ -474,8 +483,12 @@ func (s *startupCoordinator) startup(ctx context.Context, 
supported map[string][
        case error:
                return v
        case *readyFrame:
+               // Connection is successfully set up and ready to use Native 
Protocol v5
+               s.conn.startupCompleted = true

Review Comment:
   > Is there any other field that is being "implictly" synchronized like this?
   
   Specifically, I did this way only for `startupCompleted` and any other 
occurrences I didn't meet
   
   > I doubt a dev looking at this code for the first time will recognize this.
   
   Oh, I didn't look from this side... Then we could use atomics here, but the 
whole implementation won't change much. It still will update the state of 
`startupCompleted` inside during `startup()` for the **AUTHENTICATE** message 
if there it is. Or maybe implicitly call `recv()` the second time... Ok, I'll 
look at what I can do here.



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