> On July 8, 2015, 12:52 a.m., Jun Rao wrote:
> > Thanks for the patch. Saw the following transient unit test failure.
> > 
> > kafka.integration.TopicMetadataTest > 
> > testIsrAfterBrokerShutDownAndJoinsBack FAILED
> >     junit.framework.AssertionFailedError: Topic metadata is not correctly 
> > updated for broker kafka.server.KafkaServer@5df78dd0.
> >     Expected ISR: List(BrokerEndPoint(0,localhost,59755), 
> > BrokerEndPoint(1,localhost,59758), BrokerEndPoint(2,localhost,59762), 
> > BrokerEndPoint(3,localhost,59789))
> >     Actual ISR  : 
> >         at junit.framework.Assert.fail(Assert.java:47)
> >         at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:619)
> >         at 
> > kafka.integration.TopicMetadataTest$$anonfun$checkIsr$1.apply(TopicMetadataTest.scala:149)
> >         at 
> > kafka.integration.TopicMetadataTest$$anonfun$checkIsr$1.apply(TopicMetadataTest.scala:147)
> >         at scala.collection.immutable.List.foreach(List.scala:318)
> >         at 
> > kafka.integration.TopicMetadataTest.checkIsr(TopicMetadataTest.scala:147)
> >         at 
> > kafka.integration.TopicMetadataTest.testIsrAfterBrokerShutDownAndJoinsBack(TopicMetadataTest.scala:190)

I tried it a few times before submitting the patch and it passed. Wait time for 
ISR to get updated on all brokers running on same machine will probably be 
proportional to number of brokers, so I made wait time 5000L * numConfigs. 
However, it is not necessary that ISRs will be updated in that time. I think we 
have two options, first option is to increase the wait time, second option is 
to limit the number of brokers to 2 in the test case. I prefer second option, 
as the test case only requires 2 brokers for the scenario it is testing and 
will avoid making the test take longer time than an unit should be taking. I 
ran the test 20 times back to back with second approach and it works fine. Let 
me know if it still does not work for you.


- Ashish


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36030/#review90843
-----------------------------------------------------------


On July 7, 2015, 5:42 p.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36030/
> -----------------------------------------------------------
> 
> (Updated July 7, 2015, 5:42 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-972
>     https://issues.apache.org/jira/browse/KAFKA-972
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-972: MetadataRequest returns stale list of brokers
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/controller/KafkaController.scala 
> 09630d07afc75d4b92c847e31032f8a1dfa0dabe 
>   core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 
> a95ee5e0849d29a5f95fdabed4f1988a308e9872 
> 
> Diff: https://reviews.apache.org/r/36030/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>

Reply via email to