提交 a2a9c9e8 编写于 作者: K Kohsuke Kawaguchi

I think this reflects the intent better without making me uneasy about double-counting.

上级 cdadd814
......@@ -193,7 +193,7 @@ public class NodeProvisioner {
int idleSnapshot = stat.computeIdleExecutors();
int totalSnapshot = stat.computeTotalExecutors();
boolean needSomeWhenNoneAtAll = ((idleSnapshot + totalSnapshot + plannedCapacitySnapshot) == 0) && (stat.computeQueueLength() > 0);
boolean needSomeWhenNoneAtAll = (idleSnapshot==0) && (totalSnapshot + plannedCapacitySnapshot == 0) && (stat.computeQueueLength() > 0);
float idle = Math.max(stat.getLatestIdleExecutors(TIME_SCALE), idleSnapshot);
if(idle<MARGIN || needSomeWhenNoneAtAll) {
// make sure the system is fully utilized before attempting any new launch.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册