[
https://issues.apache.org/jira/browse/FLINK-40511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18154121#comment-18154121
]
이선민 commented on FLINK-40511:
-----------------------------
Hi Sylwester, I'd like to help with FLINK-40511, starting with KafkaSinkITCase.
On JDK 17, I measured about 690s for the class and 32s per recovery test.
Source throttling accounts for most of the recovery test time. With 1000
records at perCheckpoint(10), a run needs about 100 checkpoints. At the 300ms
interval used by the recovery tests, that takes about 30s. Before FLINK-38696,
throttling stopped after the first two checkpoints. It now applies throughout
the run.
As an experiment, I reduced the throttled source from 1000 to 200 records and
changed nothing else. I ran the full class once with each setting.
- Full class: 688s → 250s
- testRecovery* (9 methods, total): 290s → 73s
- rescaleListing (10 methods, total): 129s → 40s
All tests passed with 200 records. In a separate run with checkpoint logging,
the recovery tests completed 21 checkpoints, with the failure still injected
right after the first one. In the rescale, abort and migration tests, each
final job expected to finish had at least 180 records left to process and
completed at least 19 checkpoints.
If this direction sounds good, could we track the KafkaSinkITCase change in a
sub-task and assign it to me? I'd repeat the runs to check for flakiness before
opening a PR.
cc [~martijnvisser] since this relates to the rate limiter change in
FLINK-38696.
> Track and speed up slow integration tests (KafkaSinkITCase and friends)
> -----------------------------------------------------------------------
>
> Key: FLINK-40511
> URL: https://issues.apache.org/jira/browse/FLINK-40511
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / Kafka
> Reporter: Sylwester Lachiewicz
> Priority: Minor
>
> Background
> CI runs under a 50-minute job budget, and the integration-test module
> dominates it. FLINK-40139 added a 15-minute per-method JUnit timeout as a
> safety net, but the underlying suite is genuinely slow. This issue tracks
> measuring and refactoring the slow ITCases so the whole module fits the
> budget with room to spare.
> Measurements (JDK 21, surefire per-method XML; CI matches local within ~2%)
> | Class | Methods | Total |
> |---|---|---|
> | KafkaSinkITCase | 117 | ~712s |
> | KafkaTableITCase | | ~116s |
> | DynamicKafkaSourceITTest | | ~111s |
> | all other classes | | <120s each |
> KafkaSinkITCase is the outlier. Its slowest single methods are the
> exactly-once recovery variants (~30–34s each:
> testRecoveryWithExactlyOnceGuarantee1 at 33.7s, siblings at 32.6/32.5/31.7s,
> rescaleListing6 at 19.0s) — likely bounded by checkpoint intervals rather
> than test logic.
> Directions to evaluate
> * Split KafkaSinkITCase by feature (exactly-once recovery, rescaling,
> delivery guarantees) into smaller classes.
> * Reduce per-test broker/container setup cost: KafkaTestBase is all-static
> with per-class prepare/shutDownServices across 12 test classes; sharing
> environments across classes requires config-keyed shared environments
> (cluster count, secure mode) with JVM-shutdown-hook cleanup — beware
> cross-class group.id/offset leakage.
> * surefire forkCount > 1 to parallelize at class level (experimented with on
> branch ci-surefire-forkcount-2).
> Not a blocker for FLINK-40139; the 15m default timeout already bounds the
> worst case per method.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)