You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/12/08 10:06:32 UTC

[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #1386: fix: many namespace lead to provider stuck

tao12345666333 commented on code in PR #1386:
URL: https://github.com/apache/apisix-ingress-controller/pull/1386#discussion_r1043162771


##########
pkg/providers/apisix/provider_init.go:
##########
@@ -48,23 +48,26 @@ func (p *apisixProvider) Init(ctx context.Context) error {
 		pluginConfigMapA6 = make(map[string]string)
 	)
 
+	p.apisixSharedInformerFactory.Start(ctx.Done())
+	p.apisixSharedInformerFactory.WaitForCacheSync(ctx.Done())

Review Comment:
   I think we should check its return value, and log it.
   
   ```go
   	synced := p.apisixSharedInformerFactory.WaitForCacheSync(ctx.Done())
   
   	for v, ok := range synced {
   		if !ok {
   			// Log it and return
   		}
   	}
   
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org