Skip to content

Commit d09035b

Browse files
committed
revert cluster refresh
1 parent 3cd6099 commit d09035b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

osscluster.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -957,13 +957,9 @@ type clusterStateHolder struct {
957957
reloading uint32 // atomic
958958
}
959959

960-
func newClusterStateHolder(
961-
load func(ctx context.Context) (*clusterState, error),
962-
commandsCacheRefresh func(),
963-
) *clusterStateHolder {
960+
func newClusterStateHolder(load func(ctx context.Context) (*clusterState, error)) *clusterStateHolder {
964961
return &clusterStateHolder{
965-
load: load,
966-
commandsCacheRefresh: commandsCacheRefresh,
962+
load: load,
967963
}
968964
}
969965

@@ -972,7 +968,6 @@ func (c *clusterStateHolder) Reload(ctx context.Context) (*clusterState, error)
972968
if err != nil {
973969
return nil, err
974970
}
975-
c.commandsCacheRefresh()
976971
c.state.Store(state)
977972
return state, nil
978973
}
@@ -1039,7 +1034,7 @@ func NewClusterClient(opt *ClusterOptions) *ClusterClient {
10391034

10401035
c.cmdsInfoCache = newCmdsInfoCache(c.cmdsInfo)
10411036

1042-
c.state = newClusterStateHolder(c.loadState, c.cmdsInfoCache.Refresh)
1037+
c.state = newClusterStateHolder(c.loadState)
10431038
c.cmdable = c.Process
10441039
c.initHooks(hooks{
10451040
dial: nil,

0 commit comments

Comments
 (0)