-
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
Akka.Remote: can't reply back remotely to child of Pool router #884
Comments
If what @pcwiek reported is true, this is a severe bug. Can anyone else replicate? |
For the record, I'm using Akka.Cluster. I added that information to the original issue. It's possible that I messed something up, but from 'the outside' - even from the debugger - everything looks correct on the 'Permissions' actor side, paths and everything, but the last reply message just doesn't appear on the 'General' actor side. Needless to say, I was a bit confused. :) |
@pcwiek sounds like it might be a serialization issue with Where does |
@Aaronontheweb On the permissions side, here's how it looks like (brief version)
|
Receive<SomePermissionStuff>(msg =>
{
originalSender.Tell(new Permissions("Abc")); // doesn't work, originalSender is IActorRef
}); Why doesn't that work? Or do you mean "doesnt work" as in it buggs out? |
@rogeralsing I mean "doesn't work" as in it doesn't deliver the message. The actor doesn't crash or anything, the message is sent:
but on the other side it goes to
Unless I use Now I noticed that when changing the names I might have made a clerical error in message type names - anyway, the right message type is sent and handled, because |
Hmmm... if this is true, then https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka.Remote.Tests/RemotingSpec.cs#L150 should fail. I'm going to try running that test fixture with Akka.Cluster enabled and see what happens.... |
Ran this spec in Akka.Cluster - had no issues. Could reply back to ActorRef with no problems. |
@Aaronontheweb I dug deeper and it seems I found something interesting. If the nested/child actor is created 'as is' by its parent,
But, as soon as I change that to include a router:
the reply to that actor (well, to one of the actors from the pool specifically, which is visible in the path in original post as Having a 'local' router for project retrieval is pretty much must-have, because I don't want to queue all users' project requests (which also involves a remote permissions check with a small state-machine [ Also, the whole processing is initiated by web app issuing an |
@pcwiek interesting - I wonder if the issue might be that routers don't do a good job resolving the path back from a Let me write a test for this real quick and get back to you ;) |
Can confirm - this is a bug. Reproduced in #892. Working on investigating now. |
Going to leave this as "up for grabs" in case another contributor wants a stab at it |
added spec to confirm that #884 is reproducible
@pcwiek thanks for reporting this! We'll ship Akka.NET v1.0.1 with the fix included. |
Let's say I have an actor selection inside another actor:
And then I tell it to do something at one point:
That actor is hosted inside a local router, so the actor issuing the
Tell
will have a path of, for example,akka.tcp://my-system@127.0.0.1:22000/user/general/$b
.For the record, I'm using
Akka.Cluster
.In the permissions actor, I save the original sender, do some processing by bouncing messages back and forth, and at one point I tell the reply to the original sender.
IActorRef
tellFirst tell:
On the 'General' actor side (tell):
On the 'Permissions' actor side (receive):
So far, so good.
'Reply' tell:
On the 'Permissions' actor side (tell):
On the 'General' actor side (receive)
As you can see, that message goes straight to
all-systems
- that's not right...When I change the final reply to...
ActorSelection
tellthe first tell is exactly the same, but the 'reply' tell changes to:
On the 'Permissions' actor side (tell)
On the 'General' actor side (receive)
Now that works without a hitch.
IActorRef
path seems to include all elements directly in the path, whileActorSelection
has elements defined separately, but in the end they both end up being exactly the same after assembling the full path...The text was updated successfully, but these errors were encountered: