[
https://issues.apache.org/jira/browse/KAFKA-21588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oneby Wang updated KAFKA-21588:
-------------------------------
Description:
TransactionsWithTieredStoreTest#testRecoveryFromEpochOverflow intermittently
times out in the second producer's initTransactions(), before the test reaches
its epoch rollover assertion.
On trunk revision 53f279fc5882c8644fbf378fea8929852348da6c (macOS, Temurin
25.0.4, Gradle 9.8.2), repetitions 7 and 9 of 10 failed with retries disabled.
{code:bash}
./gradlew :storage:test --rerun --no-parallel --max-workers=3 \
-PmaxParallelForks=1 -PmaxTestRetries=0 -Pkafka.cluster.test.repeat=10 \
--tests
org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest.testRecoveryFromEpochOverflow
{code}
In both failures, the helper had set the producer epoch to 32765 while the
coordinator was still in PREPARE_ABORT with COMPLETE_ABORT pending. The
completion callback carried epoch 1 and threw IllegalStateException. The second
producer kept retrying InitProducerId until the test timed out after 60 seconds.
The first abort should complete before the helper sets the boundary epoch. A
test-only change waits for COMPLETE_ABORT with no pending transition, then sets
the epoch under the same metadata lock. With the original asynchronous send,
the tiered and non-tiered tests each passed 10/10 locally. In a separate run
with a 750 ms pause before appending the first COMPLETE_ABORT, the original
test reproduced the same failure and the changed test passed.
The [seven-day trunk
report|https://develocity.apache.org/scans/tests?search.relativeStartTime=P7D&search.rootProjectNames=kafka&search.tags=github%2Ctrunk&search.tasks=test&search.timeZoneId=UTC&tests.container=org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest&tests.test=testRecoveryFromEpochOverflow%28ClusterInstance%29%5B1%5D]
showed 80 passed, 0 failed and 0 flaky for this method when checked on 20
November 2026.
was:
TransactionsWithTieredStoreTest#testRecoveryFromEpochOverflow intermittently
times out in the second producer's initTransactions\(\), before the test
reaches its epoch rollover assertion.
On trunk revision 53f279fc5882c8644fbf378fea8929852348da6c \(macOS, Temurin
25.0.4, Gradle 9.8.2\), repetitions 7 and 9 of 10 failed with retries disabled.
{code:bash}
./gradlew :storage:test \-\-rerun \-\-no\-parallel \-\-max\-workers=3
\-PmaxParallelForks=1 \-PmaxTestRetries=0 \-Pkafka.cluster.test.repeat=10
\-\-tests
org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest.testRecoveryFromEpochOverflow
{code}
In both failures, the helper had set the producer epoch to 32765 while the
coordinator was still in PREPARE\_ABORT with COMPLETE\_ABORT pending. The
completion callback carried epoch 1 and threw IllegalStateException. The second
producer kept retrying InitProducerId until the test timed out after 60 seconds.
The first abort should complete before the helper sets the boundary epoch. A
test\-only change waits for COMPLETE\_ABORT with no pending transition, then
sets the epoch under the same metadata lock. With the original asynchronous
send, the tiered and non\-tiered tests each passed 10/10 locally. In a separate
run with a 750 ms pause before appending the first COMPLETE\_ABORT, the
original test reproduced the same failure and the changed test passed.
The \[seven\-day trunk
report|[https://develocity.apache.org/scans/tests?search.relativeStartTime=P7D&search.rootProjectNames=kafka&search.tags=github%2Ctrunk&search.tasks=test&search.timeZoneId=UTC&tests.container=org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest&tests.test=testRecoveryFromEpochOverflow%28ClusterInstance%29%5B1%5D|https://develocity.apache.org/scans/tests?search.relativeStartTime=P7D&search.rootProjectNames=kafka&search.tags=github%2Ctrunk&search.tasks=test&search.timeZoneId=UTC&tests.container=org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest&tests.test=testRecoveryFromEpochOverflow%28ClusterInstance%29%5B1%5D]\]
showed 80 passed, 0 failed and 0 flaky for this method when checked on 20
November 2026.
> Flaky test TransactionsWithTieredStoreTest#testRecoveryFromEpochOverflow
> ------------------------------------------------------------------------
>
> Key: KAFKA-21588
> URL: https://issues.apache.org/jira/browse/KAFKA-21588
> Project: Kafka
> Issue Type: Test
> Reporter: Oneby Wang
> Priority: Minor
> Labels: flaky-test
>
> TransactionsWithTieredStoreTest#testRecoveryFromEpochOverflow intermittently
> times out in the second producer's initTransactions(), before the test
> reaches its epoch rollover assertion.
> On trunk revision 53f279fc5882c8644fbf378fea8929852348da6c (macOS, Temurin
> 25.0.4, Gradle 9.8.2), repetitions 7 and 9 of 10 failed with retries disabled.
> {code:bash}
> ./gradlew :storage:test --rerun --no-parallel --max-workers=3 \
> -PmaxParallelForks=1 -PmaxTestRetries=0 -Pkafka.cluster.test.repeat=10 \
> --tests
> org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest.testRecoveryFromEpochOverflow
> {code}
> In both failures, the helper had set the producer epoch to 32765 while the
> coordinator was still in PREPARE_ABORT with COMPLETE_ABORT pending. The
> completion callback carried epoch 1 and threw IllegalStateException. The
> second producer kept retrying InitProducerId until the test timed out after
> 60 seconds.
> The first abort should complete before the helper sets the boundary epoch. A
> test-only change waits for COMPLETE_ABORT with no pending transition, then
> sets the epoch under the same metadata lock. With the original asynchronous
> send, the tiered and non-tiered tests each passed 10/10 locally. In a
> separate run with a 750 ms pause before appending the first COMPLETE_ABORT,
> the original test reproduced the same failure and the changed test passed.
> The [seven-day trunk
> report|https://develocity.apache.org/scans/tests?search.relativeStartTime=P7D&search.rootProjectNames=kafka&search.tags=github%2Ctrunk&search.tasks=test&search.timeZoneId=UTC&tests.container=org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest&tests.test=testRecoveryFromEpochOverflow%28ClusterInstance%29%5B1%5D]
> showed 80 passed, 0 failed and 0 flaky for this method when checked on 20
> November 2026.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)