-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨Fleet example changes #1
Changes from 1 commit
9ce51b8
86639c0
2f0deff
9391114
a9d3c00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -619,9 +619,9 @@ func (cm *controllerManager) Engage(ctx context.Context, cl cluster.Cluster) err | |
// be reentrant via noop | ||
cm.engagedClustersLock.RLock() | ||
if _, ok := cm.engagedClusters[cl.Name()]; ok { | ||
cm.engagedClustersLock.RUnlock() | ||
return nil | ||
} | ||
cm.engagedClustersLock.RUnlock() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great find! but don't we need both? RUnlock on return, and RUnlock for the else case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes! I missed that. I have also update the |
||
|
||
// add early because any engaged runnable could access it | ||
cm.engagedClustersLock.Lock() | ||
|
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.
this is an anti-pattern for structural logging. Just add
"ns", pod.Namespace
.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.
Fixed :)