diff --git a/entities/src/main/scala/com/devsisters/shardcake/Sharding.scala b/entities/src/main/scala/com/devsisters/shardcake/Sharding.scala index 08fa684..7c052e0 100644 --- a/entities/src/main/scala/com/devsisters/shardcake/Sharding.scala +++ b/entities/src/main/scala/com/devsisters/shardcake/Sharding.scala @@ -131,7 +131,9 @@ class Sharding private ( shardAssignments.get val thisPodAssignments: UIO[Chunk[ShardId]] = - getAssignments.map(_.view.collect { case (shardId, addr) if addr == this.address => shardId }.to(Chunk)) + getAssignments.map(a => + Chunk.fromIterable(a.view.collect { case (shardId, addr) if addr == this.address => shardId }) + ) val getPods: UIO[Set[PodAddress]] = shardAssignments.get.map(_.values.toSet)