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

Jason Gustafson commented on KAFKA-3117:
----------------------------------------

Looks like the first guess was nearer the mark. Although there is a guard which 
attempts to ensure fresh metadata before performing assignment, the check seems 
incorrect since it doesn't take into account the backoff interval used in the 
metadata request logic to prevent metadata storms. Instead of blocking for the 
metadata update, this causes the metadata fetch to be sent at the same time the 
rebalance begins and then the race is on. But even if the check were correct, 
we still have potential for a metadata fetch to return while a rebalance is in 
progress which can prevent assignment of some topics in the worst case. So we 
need to address this problem as well.

> Fail test at: PlaintextConsumerTest. testAutoCommitOnRebalance 
> ---------------------------------------------------------------
>
>                 Key: KAFKA-3117
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3117
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: consumer
>    Affects Versions: 0.9.0.0
>         Environment: oracle java764bit
> ubuntu 13.10 
>            Reporter: edwardt
>            Assignee: Jason Gustafson
>              Labels: newbie, test, transient-unit-test-failure
>
> java.lang.AssertionError: Expected partitions [topic-0, topic-1, topic2-0, 
> topic2-1] but actually got [topic-0, topic-1]
>       at org.junit.Assert.fail(Assert.java:88)
>       at kafka.utils.TestUtils$.waitUntilTrue(TestUtils.scala:730)
>       at 
> kafka.api.BaseConsumerTest.testAutoCommitOnRebalance(BaseConsumerTest.scala:125)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:22



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

Reply via email to