Closed googs1025 closed 2 months ago
I think that in a controller pattern, we should use locks to control concurrency. If necessary, I will submit a pull request to make the modifications. If not needed, I will close this issue.
@googs1025 each plugin is run synchronously, along with each EvictPod request, so I don't think locks are necessary (unless you are referring to some sort of external lock implementation for running multiple descheduler instances?)
Are you currently hitting any concurrency issues with descheduler?
@googs1025 each plugin is run synchronously, along with each EvictPod request, so I don't think locks are necessary (unless you are referring to some sort of external lock implementation for running multiple descheduler instances?)
Are you currently hitting any concurrency issues with descheduler?
thank you for reply! No, I was just feeling a bit confused while reviewing the source code. I'm not sure if there is a multi-instance implementation, but typically, if there are multiple instances or concurrency involved, locks or the atomic package are commonly used. The Evict method in the descheduler also follows the Kubernetes framework, right? If so, it should not involve any concurrency issues.
The Evict method in the descheduler also follows the Kubernetes framework, right? If so, it should not involve any concurrency issues.
Yes, this just calls the kubernetes API so we don't need to worry about concurrency there
ok, I'll closed this issue.
/close
@googs1025: Closing this issue.
Does EvictPod need to be locked to control concurrency?
https://github.com/kubernetes-sigs/descheduler/blob/master/pkg/descheduler/evictions/evictions.go#L157