patsonluk / airline

Apache License 2.0
109 stars 71 forks source link

Sim exception #532

Open patsonluk opened 1 year ago

patsonluk commented 1 year ago
Airline(Great Northern Airways,false,4056) profit is: ...
[ERROR] [11/21/2022 16:18:24.523] [pool-6-thread-70] [akka://rabbit-akka-stream/user/$a] null
java.util.NoSuchElementException
        at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:569)
        at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
        at com.patson.data.DelegateSource$.$anonfun$loadBusyDelegatesByQueryString$5(DelegateSource.scala:83)
        at scala.collection.immutable.List.map(List.scala:226)
        at com.patson.data.DelegateSource$.$anonfun$loadBusyDelegatesByQueryString$3(DelegateSource.scala:82)
        at scala.collection.immutable.List.map(List.scala:222)
        at com.patson.data.DelegateSource$.loadBusyDelegatesByQueryString(DelegateSource.scala:75)
        at com.patson.data.DelegateSource$.loadBusyDelegatesByCriteria(DelegateSource.scala:38)
        at com.patson.data.DelegateSource$.loadBusyDelegatesByAirline(DelegateSource.scala:24)
        at com.patson.data.DelegateSource$.loadCampaignTasksByAirlineId(DelegateSource.scala:153)
        at com.patson.AirlineSimulation$.$anonfun$airlineSimulation$18(AirlineSimulation.scala:254)
        at com.patson.AirlineSimulation$.$anonfun$airlineSimulation$18$adapted(AirlineSimulation.scala:67)
        at scala.collection.immutable.List.foreach(List.scala:312)
        at com.patson.AirlineSimulation$.airlineSimulation(AirlineSimulation.scala:67)
        at com.patson.MainSimulation$.startCycle(MainSimulation.scala:61)
        at com.patson.MainSimulation$MainSimulationActor$$anonfun$receive$1.applyOrElse(MainSimulation.scala:113)
        at akka.actor.Actor.aroundReceive(Actor.scala:539)
        at akka.actor.Actor.aroundReceive$(Actor.scala:537)
        at com.patson.MainSimulation$MainSimulationActor.aroundReceive(MainSimulation.scala:108)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:612)
        at akka.actor.ActorCell.invoke(ActorCell.scala:581)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:268)
        at akka.dispatch.Mailbox.run(Mailbox.scala:229)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

cycle 19609 starting!
Bridge actor: received from simulation that CycleStart(19609,1669047504560)
patsonluk commented 1 year ago

Probably race condition? or drop of delegates?

Has entry in busy_delegate but no corresponding entry in various delegate tasks table - very weird...as there are constraints? This also self recovered?