-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Updated BackoffSupervisor to Akka JVM 2.5.18 #3678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
{ | ||
var supervisor = Create(OnStopOptions(maxNrOfRetries: 2)); | ||
|
||
IActorRef WaitForChild(int n = 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have anything like scalatest.concurrent.Eventually
? That would simplify this piece of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AwaitCondition
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly that.
45b58a0
to
31e18cb
Compare
@ismaelhamed is this still a work in progress? or is it ready for review? |
31e18cb
to
123572a
Compare
@Aaronontheweb It's ready for review. I've just updated the tests with the |
123572a
to
037478f
Compare
037478f
to
97c2002
Compare
@Aaronontheweb I have another PR ready, that builds on top of this one, with #25933. This should put the BackoffSupervisor on a par with the JVM. |
@ismaelhamed got it - I'll review this again rq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -3754,22 +3755,29 @@ namespace Akka.Pattern | |||
{ | |||
public class static Backoff | |||
{ | |||
[System.ObsoleteAttribute("Use the overloaded one which accepts maxNrOfRetries instead.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
}); | ||
|
||
supervisor.Tell("boom"); //this will be sent to deadLetters | ||
ExpectNoMsg(500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -23,9 +23,25 @@ public static class Backoff | |||
/// <param name="minBackoff">Minimum (initial) duration until the child actor will started again, if it is terminated</param> | |||
/// <param name="maxBackoff">The exponential back-off is capped to this duration</param> | |||
/// <param name="randomFactor">After calculation of the exponential back-off an additional random delay based on this factor is added, e.g. `0.2` adds up to `20%` delay. In order to skip this additional delay pass in `0`.</param> | |||
[Obsolete("Use the overloaded one which accepts maxNrOfRetries instead.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
public abstract Akka.Pattern.BackoffOptions WithSupervisorStrategy(Akka.Actor.OneForOneStrategy supervisorStrategy); | ||
} | ||
public sealed class BackoffSupervisor : Akka.Pattern.BackoffSupervisorBase | ||
{ | ||
public BackoffSupervisor(Akka.Actor.Props childProps, string childName, System.TimeSpan minBackoff, System.TimeSpan maxBackoff, double randomFactor) { } | ||
public BackoffSupervisor(Akka.Actor.Props childProps, string childName, System.TimeSpan minBackoff, System.TimeSpan maxBackoff, Akka.Pattern.IBackoffReset reset, double randomFactor, Akka.Actor.SupervisorStrategy strategy) { } | ||
public BackoffSupervisor(Akka.Actor.Props childProps, string childName, System.TimeSpan minBackoff, System.TimeSpan maxBackoff, Akka.Pattern.IBackoffReset reset, double randomFactor, Akka.Actor.SupervisorStrategy strategy, object replyWhileStopped = null) { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this looked like a public breaking API change to me, but upon further review - this is actually calling an internal
constructor belonging to the base class and can't be directly exposed to end users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Aaronontheweb So it is considered a breaking change even when just adding optional parameters to a method signature?
@ismaelhamed done! |
Correct
…Sent from my iPhone
On Jan 10, 2019, at 11:21 AM, Ismael Hamed ***@***.***> wrote:
@ismaelhamed commented on this pull request.
In src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.approved.txt:
> public abstract Akka.Pattern.BackoffOptions WithSupervisorStrategy(Akka.Actor.OneForOneStrategy supervisorStrategy);
}
public sealed class BackoffSupervisor : Akka.Pattern.BackoffSupervisorBase
{
public BackoffSupervisor(Akka.Actor.Props childProps, string childName, System.TimeSpan minBackoff, System.TimeSpan maxBackoff, double randomFactor) { }
- public BackoffSupervisor(Akka.Actor.Props childProps, string childName, System.TimeSpan minBackoff, System.TimeSpan maxBackoff, Akka.Pattern.IBackoffReset reset, double randomFactor, Akka.Actor.SupervisorStrategy strategy) { }
+ public BackoffSupervisor(Akka.Actor.Props childProps, string childName, System.TimeSpan minBackoff, System.TimeSpan maxBackoff, Akka.Pattern.IBackoffReset reset, double randomFactor, Akka.Actor.SupervisorStrategy strategy, object replyWhileStopped = null) { }
@Aaronontheweb So it is considered a breaking change even when just adding optional parameters to a method signature?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Updated BackoffSupervisor to Akka JVM 2.5.18