-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Port scala akka PR #26816 to Akka.NET #4511
Port scala akka PR #26816 to Akka.NET #4511
Conversation
I'm having problem with this port, the port passes a scala |
ActorSystem.Create() --> ActorSystemImpl() --> DefaultDispatcherPrerequisites(). |
Should `Akka.Cluster.Metric" and "Akka.Remote" use internal dispatcher too? |
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.
Overall looks good, but have some important changes that need to be made.
|
||
## Dispatcher aliases | ||
|
||
When a dispatcher is looked up, and the given setting contains a string rather than a dispatcher config block, |
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
@@ -262,7 +262,7 @@ public ClusterSharding(ExtendedActorSystem system) | |||
{ | |||
var guardianName = system.Settings.Config.GetString("akka.cluster.sharding.guardian-name"); | |||
var dispatcher = system.Settings.Config.GetString("akka.cluster.sharding.use-dispatcher"); | |||
if (string.IsNullOrEmpty(dispatcher)) dispatcher = Dispatchers.DefaultDispatcherId; | |||
if (string.IsNullOrEmpty(dispatcher)) dispatcher = Dispatchers.InternalDispatcherId; |
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 - looks like all of the sharding /system actors (the guardians and coordinators) are supposed to run on the internal dispatcher
@@ -133,7 +133,7 @@ private IActorRef CreateReceptionist() | |||
{ | |||
var name = _config.GetString("name"); | |||
var dispatcher = _config.GetString("use-dispatcher", null); | |||
if (string.IsNullOrEmpty(dispatcher)) dispatcher = Dispatchers.DefaultDispatcherId; | |||
if (string.IsNullOrEmpty(dispatcher)) dispatcher = Dispatchers.InternalDispatcherId; |
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
@@ -604,7 +605,9 @@ public static Props Props(Props singletonProps, ClusterSingletonManagerSettings | |||
/// <returns>TBD</returns> | |||
public static Props Props(Props singletonProps, object terminationMessage, ClusterSingletonManagerSettings settings) | |||
{ | |||
return Actor.Props.Create(() => new ClusterSingletonManager(singletonProps, terminationMessage, settings)).WithDeploy(Deploy.Local); | |||
return Actor.Props.Create(() => new ClusterSingletonManager(singletonProps, terminationMessage, settings)) | |||
.WithDispatcher(Dispatchers.InternalDispatcherId) |
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
@@ -70,7 +71,9 @@ public static Config DefaultConfig() | |||
/// <returns>TBD</returns> | |||
public static Props Props(string singletonManagerPath, ClusterSingletonProxySettings settings) | |||
{ | |||
return Actor.Props.Create(() => new ClusterSingletonProxy(singletonManagerPath, settings)).WithDeploy(Deploy.Local); | |||
return Actor.Props.Create(() => new ClusterSingletonProxy(singletonManagerPath, settings)) | |||
.WithDispatcher(Dispatchers.InternalDispatcherId) |
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
@@ -293,7 +293,7 @@ public void A_UnfoldResourceAsyncSource_must_use_dedicated_blocking_io_dispatche | |||
var actorRef = refs.First(@ref => @ref.Path.ToString().Contains("unfoldResourceSourceAsync")); | |||
try | |||
{ | |||
Utils.AssertDispatcher(actorRef, "akka.stream.default-blocking-io-dispatcher"); | |||
Utils.AssertDispatcher(actorRef, ActorAttributes.IODispatcher.Name); |
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
@@ -336,7 +336,7 @@ private static ActorMaterializerSettings Create(Config config) | |||
streamRefSettings: StreamRefSettings.Create(config.GetConfig("stream-ref"))); | |||
} | |||
|
|||
private const int DefaultlMaxFixedbufferSize = 1000; | |||
private const int DefaultMaxFixedBufferSize = 1000; |
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.
Nice catch
[Fact] | ||
public void The_ActorSystem_must_provide_a_good_error_on_a_dispatcher_alias_loop_in_config() | ||
{ | ||
Sys.Dispatchers.Invoking(d => d.Lookup("dispatcher-loop-1")) |
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
task-peeking-mode = "FIFO" | ||
|
||
|
||
dedicated-thread-pool{ #settings for Helios.DedicatedThreadPool | ||
thread-count = 3 #number of threads |
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.
We might need to adjust this too.... The dedicated threadpool sized might interfere with these settings on the ForkJoinExecutor
LGTM |
Putting this on hold until we've completed #4537 |
I need to check if Akka.Remote should use the same internal dispatcher - that's critical enough where it might merit having its own threads still. |
Related to #4419
Port of akka/akka#26816