Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-564

Concurrency issue when retrieving unitialized best solution

XMLWordPrintable

    • NEW
    • NEW

      Retrieving of best solution from Kie server right after starting solver returns best solution with initialized score, but without planning variables assigned to planning entities.

      After deeper analysis I found out that this is concurrency issue (chronologically):
      (Thread 1)When Solver is starting it first set best solution same as planning problem.
      (Thread 2)Kie server receives request for getting best solution, retrieve best solution from Solver, find out that it isn't yet initialized so Kie server set score of best solution to null.
      (Thread 1)Solver runs the startSolving event where it initialize best score of solution to default value - for example 0hard/0soft for HardSoftScore.
      ""in this moment there is rewritten score attribute of best solution in Kie server as both threads hold same reference""
      (Thread 2)Kie server marshall messed up best solution and send it.

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            ksuta Karel Suta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: