-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this, and for providing a test to illustrate the issue. 🌷
Besides the minor nitpick I commented, can you please smash your commits together and rephrase the commit comment into something descriptive? After that it should be good to go 🌟
pkg/cluster/kubernetes/kubernetes.go
Outdated
loggedAllowedNS map[string]bool // to keep track of whether we've logged a problem with seeing an allowed namespace | ||
allowedNamespaces map[string]struct{} | ||
loggedAllowedNS map[string]bool // to keep track of whether we've logged a problem with seeing an allowed namespace | ||
loggedAllowedNSLock *sync.RWMutex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loggedAllowedNSLock *sync.RWMutex | |
loggedAllowedNSLock sync.RWMutex |
With this you can remove L131
:-)
made the fix per your comment and cleaned up the concurrency unit test after my final round of testing (don't want to add 20 seconds to every test run), then squashed the commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks @infa-bsurber 🥇
Can you please rebase the branch on top of |
oh wait, you said rebase, just a sec |
there, rebased on upstream master |
Description
Solves issue #2917
Unit Test Output Demonstrating Issue
Fix 1 performance (sync.Map)
Fix 2 performance (map of RWLocks)
Fix 3 performance (single RWLock) <- my personal preferred option