Hello everyone,

In our project we use Cluster Sharding with Cluster Singletons. Our Cluster 
is set up on AWS Elastic Beanstalk. 
The set up works perfectly until you start removing instances from the 
cluster. The issue arises when a shard is recreated using Akka persistence: 
during the recovery we get an error saying "Shard already allocated".

I went through the logs and realised that some of ShardRegionTerminated 
events are persisted using LocalRef.
Let me elaborate on this a little bit:
 - During the recovery I get ShardRegionRegistered event with 
RemoteActorRef.
 - Then I get ShardHomeAllocated event which allocates shard on the region
 - I get ShardRegionTerminated with LocalActorRef, which does not remove 
the Shard and Region from Maps, as RemoteActorRef is not equal to 
LocalActorRef
 - Then I get ShardRegionRegistered with Ref haveing different IP address
 - Finally when next ShardHomeAllocated is replayed I get "Shard already 
allocated" error.

How can I avoid the problem? Is there any way to force Akka use only 
RemoteActorRef or at least serialize using RemoteActorRef? Am I not using 
the library properly?
I would appreciate any help/hint on this issue.

Thank you very much!


-- 


Notice:  This email is confidential and may contain copyright material of 
members of the Ocado Group. Opinions and views expressed in this message 
may not necessarily reflect the opinions and views of the members of the 
Ocado Group. 

 

If you are not the intended recipient, please notify us immediately and 
delete all copies of this message. Please note that it is your 
responsibility to scan this message for viruses. 

 

Fetch and Sizzle are trading names of Speciality Stores Limited, a member 
of the Ocado Group.

 

References to the “Ocado Group” are to Ocado Group plc (registered in 
England and Wales with number 7098618) and its subsidiary undertakings (as 
that expression is defined in the Companies Act 2006) from time to time.  
The registered office of Ocado Group plc is Titan Court, 3 Bishops Square, 
Hatfield Business Park, Hatfield, Herts. AL10 9NE.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to