-
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
Backport of the feature called ClusterDistribution in Lagom #4455
Conversation
a44ef10
to
43093ab
Compare
@ismaelhamed we should add some documentation for this feature too - honestly that'll help me review it. We were just looking at |
@Aaronontheweb this is pretty much the only documentation you'll find, and is already included in this PR. But because this feature was borrowed from Lagom, you could also read its documentation for a little more of background (though this implementation is way more straightforward). Actually, the recommended way to distribute the projections in |
43093ab
to
7d2fa7a
Compare
# `role` setting limit what nodes the daemon processes and the keep alive pingers will run on. | ||
# Some settings can not be changed (remember-entitites and related settings, passivation, number-of-shards), | ||
# overriding those settings will be ignored. | ||
sharding = ${akka.cluster.sharding} |
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.
This seems to work, but akka.cluster.sharding.coordinator-singleton = ${akka.cluster.singleton}
does not. I guess the current hocon implementation cannot load a config section from another file!?
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.
I don't think so - cc @Arkatufus
7d2fa7a
to
b77903e
Compare
public void ShardedDaemonProcess_Should_Init_Actor_Set() | ||
{ | ||
// HACK | ||
RunOn(() => FormCluster(_config.First, _config.Second, _config.Third), _config.First); |
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.
Test does not pass unless I put FormCluster()
inside a RunOn()
. I'm missing something.
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.
I'll take a look during review
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.
Not sure, off the top of my head, what the issue might be here - what type of error do you get?
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.
I only get one ProcessActorEvent
instead of the 4 expected (one per ProcessActor
), so the test fails with timeout.
b77903e
to
0f1a862
Compare
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.
Have some minor changes requested here
@@ -190,7 +190,7 @@ namespace Akka.Cluster.Sharding | |||
public override bool Equals(object obj) { } | |||
public override int GetHashCode() { } | |||
} | |||
public sealed class StartEntityAck : Akka.Cluster.Sharding.IClusterShardingSerializable | |||
public sealed class StartEntityAck : Akka.Cluster.Sharding.IClusterShardingSerializable, Akka.Event.IDeadLetterSuppression |
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 void ShardedDaemonProcess_Should_Init_Actor_Set() | ||
{ | ||
// HACK | ||
RunOn(() => FormCluster(_config.First, _config.Second, _config.Third), _config.First); |
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.
Not sure, off the top of my head, what the issue might be here - what type of error do you get?
To set up a set of actors running with Sharded Daemon process each node in the cluster needs to run the same initialization | ||
when starting up: | ||
|
||
```csharp |
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.
Use a DocFx snippet here: https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#code-snippet
0f1a862
to
358b83f
Compare
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
Is there a reason why I can't update this PR myself? I don't see an "Update Branch" button :\ |
"Allow edits by maintainers" was unchecked. Is this option unchecked now by default? |
358b83f
to
b77ee9e
Compare
@ismaelhamed maybe - I'll need to check! |
This feature was implemented in Akka typed, not yet available in Akka.NET. But given that users will either borrow Lagom's implementation anyway or roll their own, IMO it's worthwhile having this on classical Akka.