You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Christo Lolov (Jira)" <ji...@apache.org> on 2023/02/23 13:24:00 UTC
[jira] [Commented] (KAFKA-13966) Flaky test `QuorumControllerTest.testUnregisterBroker`
[ https://issues.apache.org/jira/browse/KAFKA-13966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17692677#comment-17692677 ]
Christo Lolov commented on KAFKA-13966:
---------------------------------------
Since the related pull request has been merged I will be closing this ticket.
> Flaky test `QuorumControllerTest.testUnregisterBroker`
> ------------------------------------------------------
>
> Key: KAFKA-13966
> URL: https://issues.apache.org/jira/browse/KAFKA-13966
> Project: Kafka
> Issue Type: Bug
> Reporter: Jason Gustafson
> Assignee: David Arthur
> Priority: Major
>
> We have seen the following assertion failure in `QuorumControllerTest.testUnregisterBroker`:
> {code:java}
> org.opentest4j.AssertionFailedError: expected: <2> but was: <0>
> at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
> at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
> at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:166)
> at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:161)
> at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:628)
> at org.apache.kafka.controller.QuorumControllerTest.testUnregisterBroker(QuorumControllerTest.java:494) {code}
> I reproduced it by running the test in a loop. It looks like what happens is that the BrokerRegistration request is able to get interleaved between the leader change event and the write of the bootstrap metadata. Something like this:
> # handleLeaderChange() start
> # appendWriteEvent(registerBroker)
> # appendWriteEvent(bootstrapMetadata)
> # handleLeaderChange() finish
> # registerBroker() -> writes broker registration to log
> # bootstrapMetadata() -> writes bootstrap metadata to log
--
This message was sent by Atlassian Jira
(v8.20.10#820010)