KAFKA-4980: testReprocessingFromScratch unit test failure#2757
KAFKA-4980: testReprocessingFromScratch unit test failure#2757mjsax wants to merge 2 commits intoapache:trunkfrom
Conversation
|
Call for review @enothereska @dguy |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Any idea if the root cause for the following is the same? https://builds.apache.org/job/kafka-trunk-jdk8/1377/console |
| // ignore | ||
| } | ||
|
|
||
| waitUntilUserTopicsGotDeleted(); |
There was a problem hiding this comment.
nit: waitUntilTopicsAreDeleted
| Assert.assertEquals(0, exitCode); | ||
| } | ||
|
|
||
| private void waitUntilUserTopicsGotDeleted() { |
There was a problem hiding this comment.
I find this a bit difficult to follow. Could it be something like:
final Set<String> expectedMissingTopics = Utils.mkSet(INPUT_TOPIC,
OUTPUT_TOPIC,
OUTPUT_TOPIC_2,
OUTPUT_TOPIC_2_RERUN);
ZkUtils zkUtils = null;
try {
zkUtils = ZkUtils.apply(CLUSTER.zKConnectString(),
30000,
30000,
JaasUtils.isZkSecurityEnabled());
while(expectedMissingTopics.removeAll(scala.collection.JavaConversions.seqAsJavaList
(zkUtils.getAllTopics()))) {
Utils.sleep(100);
}
} finally {
if (zkUtils != null) {
zkUtils.close();
}
}
There was a problem hiding this comment.
+1 on what Damian said. Currently it seems to me we're adding the same topic several times to expectedMissingTopics?
There was a problem hiding this comment.
That wound do IMHO. (1) assume "topic1" was not deleted. On the first check, "topic1" gets removed from expectedMissingTopics -- in the second check it does not get removed (because it's not in the set anymore) and thus the loop would exit -- even if the topic got not deleted. Thus, we need to add all topics in each loop, because we don't know if a topic was removed or not. (2) adding the same topic several times is not a problem because we use a Set
There was a problem hiding this comment.
Yeah - you are correct. Which further highlights that i think it is currently too difficult to follow.
|
@ijuma The error says |
|
Updated. |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
@guozhangwang Call for final review and merging. |
|
Is this for KAFKA-4980? If yes please update the title. |
|
@guozhangwang Done. Did not know about the JIRA... |
|
LGTM and merged to trunk. |
|
Should we cherry-pick this to |
|
I have been thinking about it, but I feel it is not a blocking issue for |
We got test error `org.apache.kafka.common.errors.TopicExistsException: Topic 'inputTopic' already exists.` in some builds. Can reproduce reliably at local machine. Root cause it async "topic delete" that might not be finished before topic gets re-created. Author: Matthias J. Sax <matthias@confluent.io> Reviewers: Ismael Juma, Damian Guy, Guozhang Wang Closes #2757 from mjsax/minor-fix-resetintegrationtest
We got test error
org.apache.kafka.common.errors.TopicExistsException: Topic 'inputTopic' already exists.in some builds. Can reproduce reliably at local machine. Root cause it async "topic delete" that might not be finished before topic gets re-created.