-
Bug
-
Resolution: Done
-
Major
-
None
In org.drools.planner.core.localsearch.DefaultLocalSearchSolver::solvingEnded, there is potentially a divide by zero that occurs on the line:
long averageCalculateCountPerSecond = localSearchSolverScope.getCalculateCount() * 1000L / timeMillisSpend;
if timeMillisSpend is zero. Although in theory the likelihood of this occurring in practically nothing, we have actually seen it occur on a POC project with long running Planner jobs. An appropriate guard should be added to this calculation to ensure that this error cannot occur.