mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-21 22:49:31 +00:00
update k8s.io/utils to fix keymutex issues
This commit is contained in:
8
vendor/k8s.io/utils/keymutex/hashed.go
generated
vendored
8
vendor/k8s.io/utils/keymutex/hashed.go
generated
vendored
@@ -42,17 +42,17 @@ type hashedKeyMutex struct {
|
||||
|
||||
// Acquires a lock associated with the specified ID.
|
||||
func (km *hashedKeyMutex) LockKey(id string) {
|
||||
km.mutexes[km.hash(id)%len(km.mutexes)].Lock()
|
||||
km.mutexes[km.hash(id)%uint32(len(km.mutexes))].Lock()
|
||||
}
|
||||
|
||||
// Releases the lock associated with the specified ID.
|
||||
func (km *hashedKeyMutex) UnlockKey(id string) error {
|
||||
km.mutexes[km.hash(id)%len(km.mutexes)].Unlock()
|
||||
km.mutexes[km.hash(id)%uint32(len(km.mutexes))].Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (km *hashedKeyMutex) hash(id string) int {
|
||||
func (km *hashedKeyMutex) hash(id string) uint32 {
|
||||
h := fnv.New32a()
|
||||
h.Write([]byte(id))
|
||||
return int(h.Sum32())
|
||||
return h.Sum32()
|
||||
}
|
||||
|
2
vendor/k8s.io/utils/nsenter/OWNERS
generated
vendored
2
vendor/k8s.io/utils/nsenter/OWNERS
generated
vendored
@@ -1,3 +1,5 @@
|
||||
# See the OWNERS docs at https://go.k8s.io/owners
|
||||
|
||||
reviewers:
|
||||
- jsafrane
|
||||
- msau42
|
||||
|
1
vendor/k8s.io/utils/pointer/OWNERS
generated
vendored
1
vendor/k8s.io/utils/pointer/OWNERS
generated
vendored
@@ -1,4 +1,5 @@
|
||||
# See the OWNERS docs at https://go.k8s.io/owners
|
||||
|
||||
approvers:
|
||||
- apelisse
|
||||
- stewart-yu
|
||||
|
Reference in New Issue
Block a user