mirror of
https://github.com/redis/go-redis.git
synced 2025-07-25 08:21:55 +03:00
Re-order atomic field to please race detector
This commit is contained in:
@ -491,13 +491,14 @@ func (c *clusterState) slotNodes(slot int) []*clusterNode {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
type clusterStateHolder struct {
|
type clusterStateHolder struct {
|
||||||
load func() (*clusterState, error)
|
load func() (*clusterState, error)
|
||||||
reloading uint32 // atomic
|
|
||||||
|
|
||||||
state atomic.Value
|
state atomic.Value
|
||||||
|
|
||||||
lastErrMu sync.RWMutex
|
lastErrMu sync.RWMutex
|
||||||
lastErr error
|
lastErr error
|
||||||
|
|
||||||
|
reloading uint32 // atomic
|
||||||
}
|
}
|
||||||
|
|
||||||
func newClusterStateHolder(fn func() (*clusterState, error)) *clusterStateHolder {
|
func newClusterStateHolder(fn func() (*clusterState, error)) *clusterStateHolder {
|
||||||
|
Reference in New Issue
Block a user