Skip to content

Flaky test: CostBasedAutoScalerIntegrationTest.test_autoScaler_scalesUpAndDown_withSlowPublish #21003

Backlog

Description

@FrankChen021

This issue was generated automatically by Claude Code (Anthropic's AI coding agent) running a scheduled CI-triage routine on behalf of @FrankChen021. Analysis and suggested fixes are AI-produced; please verify before acting on them.

Status: Open: recurred after #20923
Subject: CostBasedAutoScalerIntegrationTest.test_autoScaler_scalesUpAndDown_withSlowPublish (embedded-tests, unit tests(main) (25, C*))
Failures: 1 · First seen: 2026-12-02 · Last seen: 2026-12-02

Root cause

The test runs the Kafka supervisor with taskDuration of 1s and supervisorRunPeriod of 10ms, so a task group can reach its duration and be checkpointed while one of its tasks is still STARTING. SeekableStreamIndexTaskRunner.pause() answers 409 for any state other than READING or PAUSED, and SeekableStreamSupervisor.checkpointTaskGroup kills every task whose pause fails, so the task ends FAILED with An exception occurred while waiting for task [...] to pause and the final assertion (line 347) fails. This is a different path from the scale-down kills fixed by #20923 (originally reported in #19517); the commit (#20961, Jersey 204 handling for asynchronous requests) does not touch /pause, which is synchronous, and the same job passed on the neighbouring master commits.

Suggested fix

In checkpointTaskGroup, do not kill a task whose pause is rejected because it is still STARTING: skip it this cycle and retry on the next supervisor run (or have the task client retry that 409). As a test-only alternative, raise taskDuration to a few seconds so tasks reach READING before their first checkpoint.

Occurrences

Failed push-triggered master jobs only. The daily triage routine adds one row per new failed job.

Date Commit Job Failure log Detail Reported in
2026-12-02 c4dee31 (#20961) unit tests(main) (25, C*) / test-jdk25-[C*] job 142884838428 [1 / 20] tasks have failed: pause returned 409, task in state STARTING (1/1 attempt)

Activity

  1. BackendArchitectX commented on Dec 3, 2026

    @BackendArchitectX
    Contributor

    Hi @FrankChen021, I'd like to investigate the checkpoint race condition and implement a fix with appropriate regression coverage. Could you assign this issue to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions