HyukjinKwon opened a new pull request, #395: URL: https://github.com/apache/spark-connect-rust/pull/395
### What changes were proposed in this pull request? The live test `test_progress_handler_that_runs_queries_without_end_raises_recursion_error` (SPARK-61188) needs the server to send an in-progress update for two queries: the outer query, and the query that its handler runs. Only then do the handler's queries nest up to the bound of nested callbacks. The script that the test runs in a subprocess now: - sets `spark.connect.progress.reportInterval` to `10ms` for its session, and - uses shuffles (`repartition(20)`) for both queries. The outer query sums `range(0, 2000, 1, 4)` (1999000), and the handler runs `range(100).repartition(20).count()`. ### Why are the changes needed? The test failed once in CI, in the Connect parity job of #394. The subprocess exited 0 with the right result, but its stderr had no `RecursionError`, so the queries did not nest. The server sends progress updates from its response sender. The sender waits for the next result for at most `spark.connect.progress.reportInterval` (2 s by default). After each wait, it sends the progress of the execution, if the execution is still tracked. So a query shorter than 2 s gets an update only if the sender wakes for its result before the execution ends and stops being tracked. A fast or idle runner can lose that race. With a 10 ms interval, the sender wakes on its timer and sends updates while the job runs. In-progress updates per execution, measured over 40 executions of each query against a Spark 4.3.0 server: | Query | 2 s interval | 10 ms interval | |---|---|---| | `range(100).repartition(20).count()` (the handler's) | 2-3 | 10-16 | | `range(0, 2000, 1, 4).repartition(20)` summed (the outer) | 3 | 8-11 | On this machine the sender wins the race at 2 s too, so the CI failure does not reproduce locally. With 10 ms, the updates no longer depend on that race. ### Does this PR introduce _any_ user-facing change? No, test only. ### How was this patch tested? - Against a local Spark 4.3.0 server started with `SPARK_TESTING=1`, as in CI, the test passed 10 of 10 times. The subprocess script on its own passed 20 of 20 times, at 1.6-1.9 s each. - With the bound of SPARK-61188 lifted (`MAX_CALLBACK_DEPTH` set to 1,000,000 in a scratch build), the test fails: the subprocess crashes with -11, as it did before the bound. So the test still catches the crash. - The live `python/tests/test_dropin_e2e.py` against the same server: 201 passed. ### 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]
