Skip to content

Conversation

Arkatufus
Copy link
Contributor

Fixes #594

Changes

  • Add DistributedDataProvider to auto-start extension list inside the WithDistributedData() extension method.
  • Add unit test.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Copy link
Contributor Author

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review

{
options.Apply(builder);
builder.AddHocon(DistributedData.DistributedData.DefaultConfig(), HoconAddMode.Append);
builder.WithExtension<DistributedDataProvider>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual fix, add the extension to the auto-start list.

var settings = ReplicatorSettings.Create(Sys);
var coordinatorName = settings.RestartReplicatorOnFailure ? $"{ReplicatorName}Supervisor" : ReplicatorName;

var actorSelection = Sys.ActorSelection(new RootActorPath(cluster.SelfAddress) / "user" / coordinatorName);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The replicator is started under user guardian, is this correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It really should be under the /system guardian but if we're stuck with /user for now then that's a separate bug that'll need fixing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, this is an Akka core issue, not Akka.Hosting

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please file a bug for that?

That might also be an ugly one to chase down if replicators are all currently hard-coded to look for /user/ paths for chatting. Might have to move that to a v1.6 issue if it ends up being a breaking behavioral change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue to track this created here: akkadotnet/akka.net#7606

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but minor nitpicks

var settings = ReplicatorSettings.Create(Sys);
var coordinatorName = settings.RestartReplicatorOnFailure ? $"{ReplicatorName}Supervisor" : ReplicatorName;

var actorSelection = Sys.ActorSelection(new RootActorPath(cluster.SelfAddress) / "user" / coordinatorName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It really should be under the /system guardian but if we're stuck with /user for now then that's a separate bug that'll need fixing.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WithDistributedData should launch replicator automatically

2 participants