Supervision for persistent actors

33 مرّة مشاهدة
التخطي إلى أول رسالة غير مقروءة

Muthukumaran Kothandaraman

غير مقروءة،
22‏/06‏/2017، 1:23:40 ص22‏/6‏/2017
إلى Akka User List
Hi, 

Context : I have a hierarchy wherein a parent (few levels below root) is a persistent-actor (let us call this as partition-manager (this Id is ensured to be unique). It starts few child actors which are again persistent (let us call them as partition-handler-X where X is some unique number to ensure uniqueness of persistence-id). In addition to partition-handler-X, partition-manager also spawns few regular non-persistent actors

Above scheme works without any issues. 

Problem : Off late we encountered a situation wherein there are very sporadic journal-write failures (using LevelDB plugin). Write-failure may as well be triggered by an environment issue. While we are investigating the same, I also intend to have a level of protection at the actors' level to use Backoff supervision strategy

Clarification : Is it advisable to use Backoff supervisor strategy for partition-manager (parent) as well as partition-handler-X (children) persistent-actors to cope with sporadic journal-write failures without disturbing any other actors of same hierarchy ?

Regards
Muthu

Muthukumaran Kothandaraman

غير مقروءة،
22‏/06‏/2017، 1:46:08 ص22‏/6‏/2017
إلى Akka User List
I understand that child actor inherits the parent's supervision strategy. In that case, for the scenario below, if I specify different strategies for different sibling actors of same hierarchy, which strategy takes precedence. 

For example, I have actor A with supervision strategy as X and actor A spins actors B, C and D. If I use strategy Y for actors B and C. Also, if I use strategy Z for actor actor D, will Y and Z strategies take precedence. Intuitively, I assume that "overriding" strategies can lead to more non-deterministic issues. 

Is my understanding that it is not a good idea to have mixed strategies among siblings correct ?

Regards
Muthu

Patrik Nordwall

غير مقروءة،
22‏/06‏/2017، 1:03:38 م22‏/6‏/2017
إلى Akka User List
You want to use Backoff supervision here, and that is actually an ordinary actor that takes care of the supervision for one other actor. You have to use a Backoff supervisor for the manager an one for each child. It only supports one-for-one.

/Patrik
--
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
الرد على الكل
رد على الكاتب
إعادة توجيه
0 رسالة جديدة