Copilot commented on code in PR #3677:
URL: https://github.com/apache/pekko/pull/3677#discussion_r4365440094


##########
cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:
##########
@@ -233,13 +245,14 @@ object ShardCoordinator {
      * @param shardId                 the id of the shard to allocate
      * @param currentShardAllocations all actor refs to `ShardRegion` and 
their current allocated shards,
      *                                in the order they were allocated
-     * @return a `Future` of the actor ref of the `ShardRegion` that is to be 
responsible for the shard, must be one of
-     *         the references included in the `currentShardAllocations` 
parameter
+     * @return a `CompletionStage` of the actor ref of the `ShardRegion` that 
is to be responsible for the shard,
+     *         must be one of the references included in the 
`currentShardAllocations` parameter
+     *         (in Pekko 1.x, this was a Scala `Future`)
      */
     def allocateShard(
         requester: ActorRef,
         shardId: String,
-        currentShardAllocations: java.util.Map[ActorRef, 
immutable.IndexedSeq[String]]): Future[ActorRef]
+        currentShardAllocations: java.util.Map[ActorRef, 
java.lang.Iterable[String]]): CompletionStage[ActorRef]

Review Comment:
   The PR description promises migration guidance, but 
`docs/src/main/paradox/migration/migration-guide-1.x-2.x.md` has no entry for 
this breaking Java API change. Add instructions for updating both methods to 
return `CompletionStage`, changing allocation values from `IndexedSeq<String>` 
to `Iterable<String>`, and recompiling existing subclasses. Include the 
release-note update mentioned in the description.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to