mirror of https://github.com/go-redis/redis.git
Merge pull request #736 from go-redis/fix/reorder-atomic-field
Re-order atomic field to please race detector
This commit is contained in:
commit
b533525eff
|
@ -491,13 +491,14 @@ func (c *clusterState) slotNodes(slot int) []*clusterNode {
|
|||
//------------------------------------------------------------------------------
|
||||
|
||||
type clusterStateHolder struct {
|
||||
load func() (*clusterState, error)
|
||||
reloading uint32 // atomic
|
||||
load func() (*clusterState, error)
|
||||
|
||||
state atomic.Value
|
||||
|
||||
lastErrMu sync.RWMutex
|
||||
lastErr error
|
||||
|
||||
reloading uint32 // atomic
|
||||
}
|
||||
|
||||
func newClusterStateHolder(fn func() (*clusterState, error)) *clusterStateHolder {
|
||||
|
|
Loading…
Reference in New Issue