HyukjinKwon opened a new pull request, #833:
URL: https://github.com/apache/spark-connect-rust/pull/833

   ### What changes were proposed in this pull request?
   
   `test_python_thread_runs_before_native_conversion_finishes` 
(`python/tests/local_data_conversion_cases.py`, from #782) and 
`test_python_thread_runs_before_operations_on_large_messages_finish` 
(`test_proto_rust_offline.py`) check that a signal interrupts an operation in 
progress. Another thread reads the operation in progress and calls 
`_thread.interrupt_main()`, and the signal handler raises `KeyboardInterrupt` 
at the next checkpoint of the operation.
   
   When the other thread read the operation near its end, after its last 
checkpoint, the operation finished before the handler ran. For example, the IPC 
write of pandas strings runs with the GIL released. The handler then recorded 
`late_or_unproven_signal`, and the test failed. That happened once in CI: the 
handler ran 8 ms after the conversion ended. The tests already ran an attempt 
again, up to five times, when the other thread read nothing in progress.
   
   With this PR, they also run an attempt again whose signal came only after 
the operation ended, when the test is of a signal.
   
   ### Why are the changes needed?
   
   To deflake the two tests. A read at the end of the operation is a timing of 
the operating system's scheduler, not a failure of the checkpoints.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, tests only.
   
   ### How was this patch tested?
   
   Both tests on pandas 2 and 3, three times each: 40 passed each time. ruff 
0.14.0 check and format.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.5
   
   This pull request and its description were written by Isaac.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to