diff --git a/src/contrib/cluster/Akka.DistributedData/DeltaPropagationSelector.cs b/src/contrib/cluster/Akka.DistributedData/DeltaPropagationSelector.cs index 8095161be97..9a81c111d56 100644 --- a/src/contrib/cluster/Akka.DistributedData/DeltaPropagationSelector.cs +++ b/src/contrib/cluster/Akka.DistributedData/DeltaPropagationSelector.cs @@ -70,7 +70,9 @@ public ImmutableDictionary CollectPropagations() else { var i = (int)(_deltaNodeRoundRobinCounter % all.Length); - slice = all.Slice(i, sliceSize).ToImmutableArray(); + var endIndex = i + sliceSize; + if (endIndex > all.Length) endIndex = all.Length; + slice = all[i..endIndex]; if (slice.Length != sliceSize) slice = slice.AddRange(all.Take(sliceSize - slice.Length));