Savonitar opened a new pull request, #332:
URL: https://github.com/apache/flink-connector-kafka/pull/332

   ## What is the purpose of the change
   
   Fix [FLINK-40912](https://issues.apache.org/jira/browse/FLINK-40912): 
`ExactlyOnceKafkaWriter` creates an admin client when using 
`TransactionNamingStrategy.POOLING` but does not close it. Each writer restart 
can leave an admin network thread and associated resources behind. This change 
releases the client when the writer closes.
   
   ## Brief change log
   
   - Add the lazy admin client to the writer's `closeAll(...)` chain and 
clarify its field Javadoc.
   - Add a parameterized integration test verifying that POOLING releases its 
admin thread and INCREMENTING never creates one. A unique client ID isolates 
the writer's thread from other clients.
   
   ## Verifying this change
   
   - Red-green verification: the new POOLING case fails without the fix because 
the admin thread remains alive after writer closure; INCREMENTING passes.
   - All 17 tests in `ExactlyOnceKafkaWriterTest` and 
`ExactlyOnceKafkaWriterITCase` pass with the fix. Checkstyle and Spotless pass.
   - Full reactor `./mvnw clean verify` passes on Java 17 with Flink 2.2.1: 785 
tests passed, one skipped, and zero failures or errors across all eight modules.
   
   ## 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: yes, the 
exactly-once writer's resource cleanup is affected. Checkpoint state, 
transaction selection and commit/abort behavior are unchanged.
   - Per-record code paths: no.
   
   ## Documentation
   
   - New feature: no.
   - Feature documentation: not applicable; the private field Javadoc is 
clarified.
   - English and Chinese user documentation: not applicable.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes
   
   Generated-by: 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]

Reply via email to