Yicong-Huang opened a new pull request, #4868:
URL: https://github.com/apache/texera/pull/4868

   ### What changes were proposed in this PR?
   
   Cherry-pick of [#4717](https://github.com/apache/texera/pull/4717) (commit 
`6ae0c46312ca744b4f761c88f1ec172ba0d41d13` on `main`) onto 
`release/v1.1.0-incubating`.
   
   `ExecutorManager` previously used a per-instance `executor_version` counter 
for the `udf-vN` tmp module name, so a fresh `ExecutorManager` always produced 
`udf-v1` and collided with whatever `udf-v1` was already cached in 
`sys.modules` from an earlier instance. The post-collision `clear()` + 
`importlib.reload()` recovery silently returned a stale class on Python 3.11. 
Lift the counter to a class-level `itertools.count(1)` so module names are 
unique across every instance in the same Python process; the recovery branch 
becomes unreachable and is removed.
   
   This unblocks #4636 (and any future `release/*`-labelled PR): the 
auto-backport leg's 
`core/runnables/test_main_loop.py::test_batch_dp_thread_can_process_batch` was 
failing on the 3.11 matrix entry against this branch with `AttributeError: 
'TestOperator' object has no attribute 'count'` (the stale-class symptom), and 
the failed test left a non-daemon `main_loop_thread` alive that prevented 
pytest from exiting — surfacing as a 30+ minute hang.
   
   ### Any related issues, documentation, discussions?
   
   Backports #4717. Original issue: #4705.
   
   ### How was this PR tested?
   
   Cherry-pick of an already-reviewed and merged commit. One conflict in 
`test_executor_manager.py` (release branch lacked the trailing 
`TestUpdateExecutor` test class that #4717 introduced); resolved by taking the 
incoming version verbatim. Local syntax + `ruff format --check` pass on both 
modified files. CI on this PR will exercise the change against the release 
branch's full Python matrix.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (claude-opus-4-7)


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