[
https://issues.apache.org/jira/browse/KAFKA-16672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17844986#comment-17844986
]
Johnny Hsu commented on KAFKA-16672:
------------------------------------
from DistributedHerder, the comment
> Similar to handling HTTP requests, config changes which are observed
>asynchronously by polling the config log are batched for handling in the work
>thread.
Thus, when there is a rebalance, the herder would throw an error
`RebalanceNeededException` (in DistributedHerder, L2309). I think this should
be an retryable exception since it's possible and we should wait for a while
and try again.
[~chia7712] I am happy to fix this.
> Fix flaky DedicatedMirrorIntegrationTest.testMultiNodeCluster
> -------------------------------------------------------------
>
> Key: KAFKA-16672
> URL: https://issues.apache.org/jira/browse/KAFKA-16672
> Project: Kafka
> Issue Type: Test
> Reporter: Chia-Ping Tsai
> Assignee: Chia-Ping Tsai
> Priority: Minor
>
> It is flaky on my jenkins, and sometimes it fails in Kafka CI[0]
> The error happens in virtue of race condition. `KafkaBasedLog` loads records
> from topic via thread, so `RebalanceNeededException` will be thrown if we
> check the task configs too soon. It seems to me `RebalanceNeededException` is
> a temporary exception so we should treat it as a retryable exception in
> waiting.
> In short, we should catch `RebalanceNeededException` in
> `awaitTaskConfigurations` [1]
> [0]
> https://ge.apache.org/scans/tests?search.buildOutcome=failure&search.buildToolType=gradle&search.relativeStartTime=P28D&search.rootProjectNames=kafka&search.timeZoneId=Asia%2FTaipei&tests.container=org.apache.kafka.connect.mirror.integration.DedicatedMirrorIntegrationTest&tests.test=testMultiNodeCluster()
> [1]
> https://github.com/apache/kafka/blob/55a00be4e973f3f4c8869b6f70de1e285719e890/connect/mirror/src/test/java/org/apache/kafka/connect/mirror/integration/DedicatedMirrorIntegrationTest.java#L355
--
This message was sent by Atlassian Jira
(v8.20.10#820010)