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

Revert "Revert "Don't provision more slaves when some are coming online.""

This reverts commit 47c520b1.

I see it clearly now. I was bit concerned about double-counting,
because one expects that totalSnapshot (total # of executors)
includes idle executors. But this is not the case, and in any way
this code should be read as (x==0 && y==0 && z==0) not (x+y+z==0)
conceptually. So reverting my revert.
上级 47c520b1
......@@ -193,7 +193,7 @@ public class NodeProvisioner {
int idleSnapshot = stat.computeIdleExecutors();
int totalSnapshot = stat.computeTotalExecutors();
boolean needSomeWhenNoneAtAll = ((totalSnapshot + plannedCapacitySnapshot) == 0) && (stat.computeQueueLength() > 0);
boolean needSomeWhenNoneAtAll = ((idleSnapshot + 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.
先完成此消息的编辑!
想要评论请 注册