Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-86

Concurrency issue when retrieving unitialized best solution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.4.0.GA
    • None
    • OptaPlanner
    • Kie server 6.4.0.Final
      WildFly 8.2

      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
              Karel Suta Karel Suta
              Karel Suta Karel Suta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: