[ 
https://issues.apache.org/jira/browse/KAFKA-2089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14487550#comment-14487550
 ] 

Rajini Sivaram commented on KAFKA-2089:
---------------------------------------

There was a race condition in asyncFetch where the update from the main thread 
could have occurred after the check for metadata but before the version was 
obtained using requestUpdate() in the async thread. In this case, awaitUpdate 
would have timed out. Fixed this by moving the requestUpdate() call that 
returns the metadata version prior to the check. Also changed "while" to "if" 
since only a single update is expected. To improve error reporting, the 
backgroundError is now a String instead of  boolean.

Recreated failure by running the test in a loop (test used to fail within 1000 
iterations every time). Have verified that the test passes now by running the 
loop for 10000 iterations.

> MetadataTest transient failure
> ------------------------------
>
>                 Key: KAFKA-2089
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2089
>             Project: Kafka
>          Issue Type: Sub-task
>    Affects Versions: 0.8.3
>            Reporter: Jun Rao
>            Assignee: Rajini Sivaram
>         Attachments: KAFKA-2089.patch
>
>
> org.apache.kafka.clients.MetadataTest > testMetadata FAILED
>     java.lang.AssertionError:
>         at org.junit.Assert.fail(Assert.java:91)
>         at org.junit.Assert.assertTrue(Assert.java:43)
>         at org.junit.Assert.assertFalse(Assert.java:68)
>         at org.junit.Assert.assertFalse(Assert.java:79)
>         at 
> org.apache.kafka.clients.MetadataTest.tearDown(MetadataTest.java:34)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to