Thanks, Yufei Gu.
Would it be easier to understand if changing calculateShares() to calculateShareUsages()?
Not really? Maybe I'm missing your point.
What if weight is 0?
Interesting point! Not a new issue, though. I'll have a look to see why it's never bitten us so far and whether we should fix it here.
It doesn't need weight while calculating min share.
Also not a new issue. That's the way it was calculated before. Yeah, it looks wrong to me, too. Karthik Kambatla, any insights?
Would it make more sense if we sort it by dominant min share which is minShare/cluster?
Also not a new issue. I'm just trying to preserve the existing semantics.
I'll address the other issues and the unit tests in a new patch shortly.