lh0156 opened a new pull request, #23056:
URL: https://github.com/apache/kafka/pull/23056

   ## Summary
   
   When a connector enters FAILED during initialization, startup, or an 
external failure notification, connector-owned resources can remain allocated 
until a later shutdown request. This change performs the failure cleanup 
immediately while preserving FAILED status so a later STOPPED target-state 
request can still be processed.
   
   The cleanup calls connector.stop() at most once for each start lifecycle, 
preserves the original failure if stop() also throws, and continues closing the 
connector context, metrics, and offset resources.
   
   ## Testing
   
   - Added parameterized source/sink lifecycle tests for initialization 
failure, startup failure, external failure, and stop failure during cleanup.
   - `./gradlew :connect:runtime:test --tests 
org.apache.kafka.connect.runtime.WorkerConnectorTest`
   - `./gradlew :connect:runtime:test --tests 
org.apache.kafka.connect.integration.ConnectWorkerIntegrationTest.testStoppedState`
   - `./gradlew :connect:runtime:spotlessCheck :connect:runtime:checkstyleMain 
:connect:runtime:checkstyleTest :connect:runtime:spotbugsMain`
   - `./gradlew :connect:runtime:test` completed 1,529 tests with one unrelated 
timing-sensitive OffsetStorageReader test failure; that test passed when rerun 
independently.
   
   This contribution is my original work, and I license it to the Apache 
Software Foundation under the Apache License, Version 2.0.


-- 
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