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

Zhiyuan Lei commented on KAFKA-16240:
-------------------------------------

 
```
TimeUnit.MILLISECONDS.sleep(10000)
val result1 = client.deleteRecords(Map(topicPartition -> 
RecordsToDelete.beforeOffset(117L)).asJava)
```
 
I found something interesting. This issue is indeed easily reproducible 
locally. After some investigation, it seems to be caused by the time difference 
of the low watermark update in the replica. As long as we add a wait time here, 
this test case can be guaranteed to pass 100%.

 

Waiting patiently is not a good solution, Further work is still required.

> Flaky test 
> PlaintextAdminIntegrationTest.testReplicaCanFetchFromLogStartOffsetAfterDeleteRecords(String).quorum=kraft
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-16240
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16240
>             Project: Kafka
>          Issue Type: Test
>            Reporter: Gantigmaa Selenge
>            Priority: Minor
>
> Failed run 
> [https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15300/8/testReport/junit/kafka.api/PlaintextAdminIntegrationTest/Build___JDK_17_and_Scala_2_13___testReplicaCanFetchFromLogStartOffsetAfterDeleteRecords_String__quorum_kraft_2/]
> Stack trace
> {code:java}
> org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node 
> assignment. Call: deleteRecords(api=DELETE_RECORDS) at 
> java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
>  at 
> java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
>  at 
> org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:165)
>  at 
> kafka.api.PlaintextAdminIntegrationTest.testReplicaCanFetchFromLogStartOffsetAfterDeleteRecords(PlaintextAdminIntegrationTest.scala:860)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to