kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-7124) Number of AnyLogDir should match the length of the replicas list
Date Sun, 01 Jul 2018 10:52:00 GMT
Ted Yu created KAFKA-7124:
-----------------------------

             Summary: 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


See discussion under 'Partitions reassignment is failing in Kafka 1.1.0' thread.

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)

Mime
View raw message