bowenli86 opened a new pull request, #323: URL: https://github.com/apache/flink-connector-kafka/pull/323
## What is the purpose of the change Fix [FLINK-40710](https://issues.apache.org/jira/browse/FLINK-40710): after checkpoint recovery redistributes Dynamic Kafka partitions, a reader can fail before the next checkpoint and report its former assignments. Reconciling those reports against pending assignments without preserving current ownership can assign one physical partition to multiple readers. This complements the discovery-race fix in #305 by reconciling checkpoint reports with current reader ownership. It prevents recurrence on valid checkpoint state. It does not normalize checkpoints that already contain duplicate partition reports. ## Brief change log - Preserve current physical-partition ownership during local reader recovery, including reactivated retained splits. - Reconcile checkpoint reports before flushing assignments; replace pending copies by physical identity and preserve recovered offsets against late discovery results. - Send bounded-source completion only after all restored assignments have been delivered. ## Verifying this change - Reproduced against Apache `main` at `61dee320`: the same three regression classes run 41 cases with 31 assertion failures and no execution errors before the fix; all 41 pass with it. - 72 focused tests pass on public Flink 2.2.1 / Java 17, including recovery, pending ownership, delayed discovery, bounded completion, serializers, proxy behavior and architecture rules. - Dynamic recovery tests exercise the coordinator callback ordering with broker discovery stubbed. Delayed-discovery tests run the real offset initializer and delay its completion callback. - `./mvnw clean verify`: 328 tests passed; 15 Docker-dependent setups errored because no valid Docker environment was detected. Full integration verification remains pending in CI. ## Does this pull request potentially affect one of the following parts: - Dependencies: no. - Public API, Table options or PyFlink wrappers: no. - Checkpointed state, serializers or exactly-once delivery: recovery assignment behavior changes; checkpoint formats and serializers are unchanged. - Per-record code paths: no. ## Documentation - New feature: no; recovery correctness fix. - Feature documentation: not applicable. - English/Chinese documentation changes: not applicable. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes Generated-by: OpenAI Codex (GPT-6) -- 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]
