BTW if you think this is a good idea, I would be happy to provide a PR for it (since I can't move to 2.4.1 yet anyway and I'm back-porting it right now).
On Tuesday, December 15, 2015 at 2:28:36 PM UTC+2, Raymond Roestenburg wrote: > > Hey hAkkers, > > I'm trying out the new BackoffSupervisor (in 2.4.1) and there is one thing > that I did not really like (and please correct me if I am wrong): > > There seems to be no way for the child to tell the BackoffSupervisor that > everything is ok again, the back-off is automatically reset based on a > duration of no errors: > > > https://github.com/akka/akka/blob/v2.4.1/akka-actor/src/main/scala/akka/pattern/BackoffSupervisor.scala#L204 > > https://github.com/akka/akka/blob/v2.4.1/akka-actor/src/main/scala/akka/pattern/BackoffSupervisor.scala#L207-L208 > > The minBackoff is both used as minimal back-off duration and as this > automatic reset duration. Which actually makes the minBackoff hard to set > correctly, since it depends on the types of errors (and the speed at which > the errors occur) in the child, and it makes it a bad idea to set it too > low, since the back-off can then get stuck in repeating per minBackoff if > the child does not crash fast enough the first time (within minBackoff), > which means it will not properly back-off. > > > So in my case the child is something that connects over the network and > might crash, which could be a very fast error, or a very slow error. > A separate duration for reset would be a simple improvement, or even > better a message the child can send to the BackoffSupervisor to indicate > success (basically BackoffSupervisor .ResetRestartCount) and a way to > disable the auto-reset at minBackoff. > > (I do appreciate that the BackoffSupervisor is done in such a way that it > can be dropped in between actors with hardly any change!) > > Cheers, > Ray > -- >>>>>>>>>> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
