It seems I have dead lock on my data, because I am passing the same object 
to several actors in parallel. 

воскресенье, 16 августа 2015 г., 12:03:43 UTC+3 пользователь Sergey Sopin 
написал:
>
> Hello, 
>
> I have some problems with Akka and memory, hope you can help me. 
> I have following code: 
>
> //================CallerActor procedure================
>
>     private Iterable<Future<Object>> 
> process(ConfiguredPathProcessingRequest request) {
>         Collection<Future<Object>> result = new ArrayList<>();
>         for (int ceSize = request.minCoverElementSize; ceSize <= 
> request.path.getMaxCoverElementSize(); ceSize += 2) {
>             for (int segSize = request.minCoverElementSize; segSize <= 
> ceSize; segSize += 2) {
>                 Future<Object> future = 
> Patterns.ask(subPathProcessingSupervisor,
>                         new SubPathProcessingRequest(request.path, ceSize, 
> segSize), waitingDuration);
>                 result.add(future);
>             }
>         }
>
>         return result;
>     }
>
>
> //================WorkerSupervisor Actor:================
>
>
> public class SubPathProcessingSupervisor extends NotificationActor{
>
>     {receive(ReceiveBuilder.match(SubPathProcessingRequest.class, o -> {
>             log().debug("SubPathProcessingSupervisor : Message 
> received...");
>             ActorRef subPathProcessorActor = 
> context().actorOf(Props.create(SubPathFinderActor.class));
>             subPathProcessorActor.forward(o, context());
>         }).matchAny( o -> unhandled(o)).build());
>     }
> }
>
> //================SubPathFinderActor:================
>
>     {receive(ReceiveBuilder.match(SubPathProcessingRequest.class, mes -> {
>             log().debug("SubPathFinder actor : Message received...");
>             first = true;
>             last = false;
>             findSubPaths(mes.path, mes.coverElementSize, mes.segmentSize);
>         }).matchAny(message -> unhandled(message)).build());
>     }
>
>
> There I have caller actor which creates single instance of Worker 
> Supervisor and sends requests to it. Supervisor creates new instance of 
> worker per each request and forwards message to it. As you could see there 
> I have some logging when message received, but following recod doesn't 
> appear: "SubPathFinder actor : Message received...". 
> What's wrong there? 
>
> PS: Processor is really busy all the time. Loading is 100%. Memory 
> consumprion in debug mode is 1.2 Gb.
>
> Thanks!
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to