Matthew-DWM opened a new pull request, #9413: URL: https://github.com/apache/texera/pull/9413
### What changes were proposed in this PR? The JVM side of a Python UDF worker waited for each data put's acknowledgement with `poll(5, SECONDS)`. When Python took longer, for example while a UDF held the GIL in one long C call, `poll` returned `null`, and the resulting `NullPointerException` silently ended the Flight client thread, so the run stayed `RUNNING` with no error. Both put paths in `PythonProxyClient` now share one helper: - It waits for the ack with `read()`, which blocks until the ack arrives and still throws when the call fails. - A put that ends without an ack, or whose ack carries no queue size, fails with an error naming the worker instead of a `NullPointerException` or `IndexOutOfBoundsException`. - After the ack, it checks the put's final status (`getResult()`), so a put that fails after its ack ends the client with that error instead of being ignored. - It closes the put listener in a `finally` block. ``` Before: a put's ack arrives > 5 s late -> client thread ends silently -> run hangs, no error After: a put's ack arrives > 5 s late -> client keeps waiting -> run completes ``` #### Before (main) <img width="1440" height="720" alt="before-gil" src="https://github.com/user-attachments/assets/ea3795ef-fbc7-4a0d-94d2-d6d91f60ea52" /> #### After (this PR) <img width="1440" height="720" alt="after-gil" src="https://github.com/user-attachments/assets/b7031004-a3f3-44bb-95cc-998d0c11ed4f" /> ### Any related issues, documentation, discussions? Part of #9361. Split out of #9364, which handles the worker side. ### How was this PR tested? Five new tests in `PythonProxyClientSpec`, written before the fix; all pass with it: - An ack that arrives late (200 ms): the later put and action still go through, and the late ack's queue size is used. Passes on `main` too. - A put that fails after its ack ends the client with the server's error. On `main` the error is ignored. - A put that completes without an ack ends the client with an error naming the worker. On `main`: `NullPointerException`. - An ack that carries no queue size ends the client with an error naming the worker. On `main`: `IndexOutOfBoundsException`. - Guard: a rejected put still ends the client with the server's error, so `read()` doesn't wait forever on a failed call. ``` sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.pythonworker.PythonProxyClientSpec" ``` In the UI, #9361's step-2 workflow hangs on main and completes with 10,000 rows on this branch (screenshots above). ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) -- 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]
