[ 
https://issues.apache.org/jira/browse/KAFKA-9721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chia-Ping Tsai updated KAFKA-9721:
----------------------------------
    Summary: ReassignPartitionsCommand#reassignPartitions doesn't wait for the 
completion of altering replica folder  (was: 
ReassignPartitionsCommand#reassignPartitions does not)

> ReassignPartitionsCommand#reassignPartitions doesn't wait for the completion 
> of altering replica folder
> -------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-9721
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9721
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Major
>
> {code:scala}
>         val replicasAssignedToFutureDir = 
> mutable.Set.empty[TopicPartitionReplica]
>         while (remainingTimeMs > 0 && replicasAssignedToFutureDir.size < 
> proposedReplicaAssignment.size) {
>           replicasAssignedToFutureDir ++= 
> alterReplicaLogDirsIgnoreReplicaNotAvailable(
>             proposedReplicaAssignment.filter { case (replica, _) => 
> !replicasAssignedToFutureDir.contains(replica) },
>             adminClientOpt.get, remainingTimeMs)
>           Thread.sleep(100)
>           remainingTimeMs = startTimeMs + timeoutMs - 
> System.currentTimeMillis()
>         }
> {code}
> The response of altering replica folder is NOT the completed folder since the 
> alter process executes on another thread to move the data from source to 
> target. Hence, it should depend on the response of #describeLogDirs rather 
> than #alterReplicaLogDirs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to