You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Func NewPodTopologyCache responses to build a common cache for plugin NodeResourceTopologyMatch, and it will be called in plugin's New func as following:
Then, once plugin NodeResourceTopologyMatch appears in multi profiles for one scheduler app, then the plugin will be initialized many times, which means the upper func New will be triggered more than once.
Then, the most important thing is multi PodTopologyCache shows in one scheduler app. Is there any potential risks in this situation(e.g. data race)?
The text was updated successfully, but these errors were encountered:
NoicFank
changed the title
Bug: Is there any risks that more than one NewPodTopologyCache running is one Scheduler App?
Bug: Is there any risks that more than one NewPodTopologyCache running in one Scheduler App?
Oct 20, 2023
The nearly same thing is putting the creating SharedInformerFactory into plugin as following, Then there will be many informers for same one Resource(GVK), which means there will be many duplicate same indexer(local cache) for one Resource.
And for this case, not only 「same plugin appears in multi profiles」 will trigger this, once resource is used in other plugins will also trigger this.
It could bring many memory pressure when all the same informers to list same one resource, which may trigger OOM.
And there is chance that indexer inconsistency for one resource
In my opinion, Bring initialization of SharedInformerFactory and Self-Define Cache into cmd.main, which means plugin's func New() should be wrapped that SharedInformerFactory and Self-Define Cache will be injected into plugin as plugin.New() parameters.
Func
NewPodTopologyCache
responses to build a common cache for pluginNodeResourceTopologyMatch
, and it will be called in plugin's New func as following:Then, once plugin
NodeResourceTopologyMatch
appears inmulti profiles
for one scheduler app, then the plugin will be initialized many times, which means the upper funcNew
will be triggered more than once.Then, the most important thing is multi PodTopologyCache shows in one scheduler app. Is there any potential risks in this situation(e.g. data race)?
@Garrybest @qmhu PTAL, thanks
The text was updated successfully, but these errors were encountered: