Skip to content

Commit 6432b3d

Browse files
authored
Merge pull request kubernetes#125920 from siyuanfoundation/bug
fix lock bug for componentGlobalsRegistry
2 parents 82429a9 + d31aebe commit 6432b3d

File tree

1 file changed

+2
-2
lines changed
  • staging/src/k8s.io/apiserver/pkg/util/version

1 file changed

+2
-2
lines changed

staging/src/k8s.io/apiserver/pkg/util/version/registry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ func NewComponentGlobalsRegistry() *componentGlobalsRegistry {
135135
}
136136

137137
func (r *componentGlobalsRegistry) Reset() {
138-
r.mutex.RLock()
139-
defer r.mutex.RUnlock()
138+
r.mutex.Lock()
139+
defer r.mutex.Unlock()
140140
r.componentGlobals = make(map[string]*ComponentGlobals)
141141
r.emulationVersionConfig = nil
142142
r.featureGatesConfig = nil

0 commit comments

Comments
 (0)