wilfred-s commented on PR #859: URL: https://github.com/apache/yunikorn-k8shim/pull/859#issuecomment-2225107185
> 1. (main goroutine) InitializeState() -> I'm not quite confident. That should not be a problem. > For the InitializeState(), I'm not quite confident to answer below questions: Q: What will happen if NodeInformer update NodeA when InitializeState() is registring NodeA? Q: What will happen if PodInformer update PodA when InitializeState() is registring PodA? > > Is it still safe? The informers are first synced without event handling on. That gives us the base list of pods and nodes. All these listed objects are then processed. The event handler are turned off until we have done all that work. The step 5 in the init turns them on. At that point we no longer have to worry about the init code. The cache lock will prevent the simultaneous changes. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
