diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java index 3fec4818..6416dd6e 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/infrastructure/highavailable/impl/HighAvailablePoolImpl.java @@ -265,13 +265,11 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements if (allocationFinish(load)) { break; } - if (this.queryAgentStatus(agent) == null || agent.isInUse() - || agent.getRemainLoad() != agent.getMaxLoad()) { + if (agent.isInUse()) { continue; } loadForRunCurrent = getMin(load, agent.getRemainLoad()); agent.bookTest(loadForRunCurrent); - this.getAgentRepository().update(agent); runScenarioResultModel = this.getAgentMessenger().bookTest(agent, loadForRunCurrent); if (runScenarioResultModel == null @@ -279,6 +277,7 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements logger.error(runScenarioResultModel == null ? "runScenarioResultModel is null" : "runScenarioResultModel.getRunId()" + runScenarioResultModel.getRunId()); + agent.backLoad(loadForRunCurrent); continue; } load -= loadForRunCurrent; @@ -289,6 +288,7 @@ public class HighAvailablePoolImpl extends CurrentLoadSubject implements runScenarioResultModel.getRunId()); result.add(runningAgentWithouRunningScript); this.addABlotter(runningAgentWithouRunningScript); + this.getAgentRepository().update(agent); } if (!allocationFinish(load)) { logger.error("allocationUnfinished, remain " + load