hpoenixf opened a new pull request, #24296: URL: https://github.com/apache/kafka/pull/24296
### Summary Fixes [KAFKA-21567](https://issues.apache.org/jira/browse/KAFKA-21567). A successful end-offset lookup must not clear a task's timeout while its committed-offset lookup is incomplete. Treat missing entries in a successful Admin response as incomplete initialization rather than retrying in a tight loop. - Aggregate initialization results per task; clear its timeout only when all requested offsets are available. Healthy unrelated tasks can continue. - Back off incomplete initialization using retry.backoff.ms. When nothing is restoring, wait at most the normal poll interval (at least 1 ms for a zero poll interval), instead of spinning. - Preserve the original task-scoped timeout exception on partial periodic standby refresh. - Exclude paused and not-yet-initialized standby changelogs from periodic refresh, so refresh does not bypass initialization backoff. ### Validation On trunk base 5cf3237139a2d94ab0ff6248fadf6cc789d73100: - Before the fix, two targeted regression tests failed on the intended behavior: missing committed offsets did not advance the task timeout, and repeated restore calls performed repeated lookups without backoff. - After the fix: **186 tests passed, 0 failed, 0 skipped**: StoreChangelogReaderTest (80), DefaultStateUpdaterTest (102), StreamTaskTest.should*TaskTimeout* (2), StandbyTaskTest.should*TaskTimeout* (2). - checkstyleMain, checkstyleTest, spotbugsMain, and git diff --check passed. - **58 additional existing assignment/promotion-related unit regressions passed, 0 failed or skipped**: TaskMovementTest (6), HighAvailabilityTaskAssignorTest.should*Warm* (30), DefaultStreamsRebalanceListenerTest (19), and three TaskManager standby-to-active/promotion-error tests (3). Targeted command: ``` ./gradlew streams:test --tests '*StoreChangelogReaderTest' --tests '*DefaultStateUpdaterTest' --tests '*StandbyTaskTest.should*TaskTimeout*' --tests '*StreamTaskTest.should*TaskTimeout*' ``` Local verification used Gradle 9.8.2 on a Java 21 runtime with an explicit JDK 17 compilation/test toolchain. The full Kafka/Streams suites, JDK 25 matrix, and real-cluster UNSTABLE_OFFSET_COMMIT scenarios have **not** been run. The additional unit tests cover existing assignment/promotion behavior, not end-to-end warmup promotion under this specific injected missing-offset failure. ### Review questions This draft welcomes feedback on: 1. Applying the existing exceptional-lookup timeout policy to missing-offset responses for standby tasks (including warmup replicas). 2. Keeping a task's pending initialization atomic across sibling partitions while allowing unrelated tasks to progress. 3. Locating the bounded idle wait in the reader rather than changing updater scheduling. Related #24256 overlaps only the paused-standby lookup filter. This is not a dependency or a duplicate of that change: missing-response handling, task-level timeout aggregation, retry backoff, REGISTERED-state filtering, and taskId-preserving exception propagation remain distinct. If that PR merges first, the overlapping hunk can be reconciled on rebase. No public API, new configuration, or protocol changes. Generated-by: OpenAI ChatGPT (model version not exposed) -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
