Skip to content

Commit

Permalink
Backport akkadotnet#5976 - Fix sharding tolerant reader
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkatufus committed Jun 1, 2022
1 parent 9063439 commit da72581
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -109,7 +109,12 @@ protected override bool ReceiveRecover(object message)
if (State.RegionProxies.Contains(proxyTerminated.RegionProxy))
State = State.Updated(evt);
return true;
case ShardHomeAllocated _:
case ShardHomeAllocated homeAllocated:
// if we already have identical ShardHomeAllocated data, skip processing it
// addresses https://github.com/akkadotnet/akka.net/issues/5604
if (State.Shards.TryGetValue(homeAllocated.Shard, out var currentShardRegion)
&& Equals(homeAllocated.Region, currentShardRegion))
return true;
State = State.Updated(evt);
return true;
case ShardHomeDeallocated _:
Expand Down

0 comments on commit da72581

Please sign in to comment.