chia7712 commented on a change in pull request #10389: URL: https://github.com/apache/kafka/pull/10389#discussion_r602237567
########## File path: core/src/test/scala/unit/kafka/server/ListOffsetsRequestTest.scala ########## @@ -154,7 +160,10 @@ class ListOffsetsRequestTest extends BaseRequestTest { @Test def testResponseIncludesLeaderEpoch(): Unit = { - val partitionToLeader = TestUtils.createTopic(zkClient, topic, numPartitions = 1, replicationFactor = 3, servers) + val topicConfig = new Properties + // make sure we won't lose data when force-removing leader + topicConfig.setProperty(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG, "2") Review comment: IIRC, acks=all means “all in-sync replicas” (rather than “all replicas”) have to receive record. In other words, produce request can be completed after one replica has received the record if mini ISR is one. When we shutdown the server with mini replica=1, the successful record may be NOT synced with other broker (there are 3 brokers totally). In short , the data could get lost after we shutdown current leader. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org