-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Hi,
I'm using Akka.remote(1.0.6 from nuget) to build pub-sub like service.
When one of pub-sub member restarts its actorsystem while the other is running, using
following code
var task = Instance.Terminate(); // Instance of 'ActorSystem'
task.Wait();
Instance = null;
Sometims(not always I think) I got following error log in the other side(not the one restarted)
2016/04/02 09:29:07.303 11 ERROR Akka.Actor.OneForOneStrategy 동일한 키를 사용하는 항목이 이미 추가되었습니다. System.ArgumentException: 동일한 키를 사용하는 항목이 이미 추가되었습니다.
위치: System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
위치: System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
위치: Akka.Remote.EndpointRegistry.RegisterReadOnlyEndpoint(Address address, IActorRef endpoint, Int32 uid)
위치: Akka.Remote.EndpointManager.AcceptPendingReader(IActorRef takingOverFrom)
위치: Akka.Remote.EndpointManager.<Accepting>b__42_21(Terminated terminated)
위치: lambda_method(Closure , Object , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 )
위치: Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture`12.Handle(T value)
위치: Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction`1 partialAction)
위치: Akka.Actor.ReceiveActor.<>c__DisplayClass11_0.<Become>b__0(Object m)
위치: Akka.Actor.ActorCell.<>c__DisplayClass109_0.<Akka.Actor.IUntypedActorContext.Become>b__0(Object m)
위치: Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
위치: Akka.Actor.ActorCell.ReceiveMessage(Object message)
위치: Akka.Actor.ActorCell.ReceivedTerminated(Terminated t)
위치: Akka.Actor.ActorCell.AutoReceiveMessage(Envelope envelope)
위치: Akka.Actor.ActorCell.Invoke(Envelope envelope)
Sorry for the Korean in log, anyway it reads "You are trying to add a new item whose key is already in dictionary" or something.
Due to my lack of knowledge on EndpointManager, I only have to say I'm feeling like somethings go wrong. sorry for that. but Is this really ok?
https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka.Remote/EndpointRegistry.cs#L58
After this happens, the other actorsystem(not the one who restarted) looks like missing detectection of some remote actors(in the actorsystem who restarted)'s death watch.
Any hint or advice will be appreciated.