rmannibucau opened a new pull request, #9402: URL: https://github.com/apache/hop/pull/9402
Fixes #9400 Split out of #9374 per review: the transform-lifecycle fixes, isolated from the engine shutdown deadlock fix (now #9401). ## What changed - **Execute Process**: `stopRunning()` is a non-waiting cancellation request; the process is observed during launch/process-wait/output-drain. A stopped process is now killed gracefully (SIGTERM) then, only if it does not exit within 30 s, forcibly (SIGKILL) - matching `main` - and this happens on the cleanup thread so `stopRunning()` stays non-blocking. Descendant polling reverted to 1 s to stop rescanning /proc every 100 ms. On normal completion, stream cleanup runs inline (the readers already closed the streams) instead of spawning a cleanup thread per row. An exec failure (`IOException`/`SecurityException`/`IllegalArgumentException`) is routed to the error hop rather than escaping `processRow`. - **Html2Text / DetectLanguage / StanfordSimpleNlp**: admission and completion accounting are balanced on worker completion and rejected submission so failed jobs no longer strand waits or leak outstanding-job counts. A stuck asynchronous provider can no longer block `finish()`/`dispose()` forever: draining waits up to 30 s, then logs and abandons the remaining jobs. An asynchronous failure is surfaced once (further calls do not log it again). - **DetectLanguage**: `unloadLanguageModels()` is called only from `dispose()`, not also from `finish()`. - **LanguageModelChat**: submission accounting is balanced on worker completion and rejected submission; owned executors are shut down without waiting for a worker from a stop callback; draining is capped at 30 s like the NLP transforms. ## Behaviour changes - Synchronous NLP rows that fail are now routed to the error hop instead of silently dropping the row. - Execute Process no longer emits a row for a process that was stopped mid-run. ## Tests - New async/lifecycle tests spin up real or mocked providers/processes and assert observable behaviour: output drained on normal completion, no hang on stop, graceful-then-forced process kill, balanced reservation accounting and capped disposal. All `Html2TextAsyncTest` (9), `DetectLanguageAsyncTest` (9), `StanfordSimpleNlpAsyncTest` (9), `LanguageModelChatLifecycleTest` (6) and `ExecProcessTest` (19) tests pass. -- 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]
