Merge pull request #74348 from danielqsj/ku

update k8s.io/utils to fix keymutex issues
This commit is contained in:
Kubernetes Prow Robot 2019-02-21 22:17:57 -08:00 committed by GitHub
commit d9f3e96796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 56 additions and 53 deletions

26
Godeps/Godeps.json generated
View File

@ -4288,55 +4288,55 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/clock", "ImportPath": "k8s.io/utils/clock",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/exec", "ImportPath": "k8s.io/utils/exec",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/exec/testing", "ImportPath": "k8s.io/utils/exec/testing",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/io", "ImportPath": "k8s.io/utils/io",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/keymutex", "ImportPath": "k8s.io/utils/keymutex",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/net", "ImportPath": "k8s.io/utils/net",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/nsenter", "ImportPath": "k8s.io/utils/nsenter",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/path", "ImportPath": "k8s.io/utils/path",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/pointer", "ImportPath": "k8s.io/utils/pointer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/strings", "ImportPath": "k8s.io/utils/strings",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/kustomize/pkg/commands/build", "ImportPath": "sigs.k8s.io/kustomize/pkg/commands/build",

View File

@ -2568,15 +2568,15 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/structured-merge-diff/fieldpath", "ImportPath": "sigs.k8s.io/structured-merge-diff/fieldpath",

View File

@ -2072,19 +2072,19 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/pointer", "ImportPath": "k8s.io/utils/pointer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/structured-merge-diff/fieldpath", "ImportPath": "sigs.k8s.io/structured-merge-diff/fieldpath",

View File

@ -704,7 +704,7 @@
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/kustomize/pkg/commands/build", "ImportPath": "sigs.k8s.io/kustomize/pkg/commands/build",

View File

@ -620,15 +620,15 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/yaml", "ImportPath": "sigs.k8s.io/yaml",

View File

@ -980,19 +980,19 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/net", "ImportPath": "k8s.io/utils/net",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/yaml", "ImportPath": "sigs.k8s.io/yaml",

View File

@ -152,7 +152,7 @@
}, },
{ {
"ImportPath": "k8s.io/utils/pointer", "ImportPath": "k8s.io/utils/pointer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
} }
] ]
} }

View File

@ -536,15 +536,15 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/yaml", "ImportPath": "sigs.k8s.io/yaml",

View File

@ -1824,15 +1824,15 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/structured-merge-diff/fieldpath", "ImportPath": "sigs.k8s.io/structured-merge-diff/fieldpath",

View File

@ -152,7 +152,7 @@
}, },
{ {
"ImportPath": "k8s.io/utils/pointer", "ImportPath": "k8s.io/utils/pointer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
} }
] ]
} }

View File

@ -152,7 +152,7 @@
}, },
{ {
"ImportPath": "k8s.io/utils/pointer", "ImportPath": "k8s.io/utils/pointer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
} }
] ]
} }

View File

@ -152,7 +152,7 @@
}, },
{ {
"ImportPath": "k8s.io/utils/pointer", "ImportPath": "k8s.io/utils/pointer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
} }
] ]
} }

View File

@ -512,7 +512,7 @@
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/yaml", "ImportPath": "sigs.k8s.io/yaml",

View File

@ -536,15 +536,15 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/yaml", "ImportPath": "sigs.k8s.io/yaml",

View File

@ -1776,15 +1776,15 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/structured-merge-diff/fieldpath", "ImportPath": "sigs.k8s.io/structured-merge-diff/fieldpath",

View File

@ -584,7 +584,7 @@
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/yaml", "ImportPath": "sigs.k8s.io/yaml",

View File

@ -1160,15 +1160,15 @@
}, },
{ {
"ImportPath": "k8s.io/utils/buffer", "ImportPath": "k8s.io/utils/buffer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/integer", "ImportPath": "k8s.io/utils/integer",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "k8s.io/utils/trace", "ImportPath": "k8s.io/utils/trace",
"Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" "Rev": "c2654d5206da6b7b6ace12841e8f359bb89b443c"
}, },
{ {
"ImportPath": "sigs.k8s.io/yaml", "ImportPath": "sigs.k8s.io/yaml",

View File

@ -42,17 +42,17 @@ type hashedKeyMutex struct {
// Acquires a lock associated with the specified ID. // Acquires a lock associated with the specified ID.
func (km *hashedKeyMutex) LockKey(id string) { 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. // Releases the lock associated with the specified ID.
func (km *hashedKeyMutex) UnlockKey(id string) error { 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 return nil
} }
func (km *hashedKeyMutex) hash(id string) int { func (km *hashedKeyMutex) hash(id string) uint32 {
h := fnv.New32a() h := fnv.New32a()
h.Write([]byte(id)) h.Write([]byte(id))
return int(h.Sum32()) return h.Sum32()
} }

2
vendor/k8s.io/utils/nsenter/OWNERS generated vendored
View File

@ -1,3 +1,5 @@
# See the OWNERS docs at https://go.k8s.io/owners
reviewers: reviewers:
- jsafrane - jsafrane
- msau42 - msau42

1
vendor/k8s.io/utils/pointer/OWNERS generated vendored
View File

@ -1,4 +1,5 @@
# See the OWNERS docs at https://go.k8s.io/owners # See the OWNERS docs at https://go.k8s.io/owners
approvers: approvers:
- apelisse - apelisse
- stewart-yu - stewart-yu