Skip to content

Commit 2d69f57

Browse files
Update pkg/utils/informer/informermanager.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c341417 commit 2d69f57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/utils/informer/informermanager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ func (s *informerManagerImpl) Stop() {
207207

208208
func (s *informerManagerImpl) AddEventHandlerToInformer(resource schema.GroupVersionResource, handler cache.ResourceEventHandler) {
209209
// Get or create the informer (this is idempotent - if it exists, we get the same instance)
210-
// The idempotent behavior is important because it is called by both the change detector and informer populator,
211-
// which run concurrently on the leader hub agent.
210+
// The idempotent behavior is important because this method may be called multiple times,
211+
// potentially concurrently, and relies on the shared informer instance from the factory.
212212
informer := s.informerFactory.ForResource(resource).Informer()
213213

214214
// Add the event handler to the informer

0 commit comments

Comments
 (0)