You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
s.control.getConn() can return different connection on each call, at least one path is possible when c.attemptReconnectToAnyOfHosts is executed in parallel.
Which means that this code can lock one connection and unlock another:
s.control.getConn().conn.mu.Lock() # connection1 is locked
# c.attemptReconnectToAnyOfHosts executed in parallel replacing `s.control.getConn().conn` with new value
s.tabletsRoutingV1 = s.control.getConn().conn.tabletsRoutingV1
s.control.getConn().conn.mu.Unlock() # connection2 is unlocked
Please answer these questions before submitting your issue. Thanks!
What version of Gocql are you using?
master
gocql/session.go
Lines 232 to 234 in 9dd9a7f
s.control.getConn()
can return different connection on each call, at least one path is possible whenc.attemptReconnectToAnyOfHosts
is executed in parallel.Which means that this code can lock one connection and unlock another:
Suggested code:
Also probably it makes sense to make
getter
fortabletsRoutingV1
that would Lock/UnlockThe text was updated successfully, but these errors were encountered: