You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2018/07/01 12:53:00 UTC

[jira] [Resolved] (KAFKA-7124) Number of AnyLogDir should match the length of the replicas list

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

Ted Yu resolved KAFKA-7124.
---------------------------
    Resolution: Not A Problem

> Number of AnyLogDir should match the length of the replicas list
> ----------------------------------------------------------------
>
>                 Key: KAFKA-7124
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7124
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Major
>
> See discussion under 'Partitions reassignment is failing in Kafka 1.1.0' thread reported by Debraj Manna.
> Here is snippet from generated json file:
> {code}
> {"topic": "Topic3", "partition": 7, "log_dirs": ["any"], "replicas": [3, 0, 2]}
> {code}
> Code snippet from ReassignPartitionsCommand.scala :
> {code}
>           "log_dirs" -> replicas.map(r => replicaLogDirAssignment.getOrElse(new TopicPartitionReplica(tp.topic, tp.partition, r), AnyLogDir)).asJava
> {code}
> We know that the appearance of "any" was due to the OrElse clause.
> There is a bug in the above code that the number of AnyLogDir should match the length of the replicas list, or "log_dirs" should be omitted in such case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)