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


##########
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:
   I think there's a way to avoid using `atomic`... You'd have to remove the 
field from the `Conn` object completely and pass it to `exec()` and `recv()` as 
an argument which doesn't seem too complicated to do. Maybe `exec` can become a 
wrapper around an `internalExec` so we don't have to set `startupCompleted` on 
all places that call `exec` where `startupCompleted` is always `true` (like 
`executeQuery`, `executeBatch`, `heartBeat`, etc.)



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