HyukjinKwon opened a new pull request, #883:
URL: https://github.com/apache/spark-connect-rust/pull/883
### What changes were proposed in this pull request?
Two tests of `crates/spark-connect-core/tests/reattach_cleanup.rs` gave the
reattachable ExecutePlan a short per-RPC deadline:
- `reattaches_past_deadlines_are_bounded_as_the_reference_retries`: 100 ms;
- `execution_streams_carry_their_deadlines_and_reattach_past_them`: 200 ms.
A per-RPC deadline runs from the call, so it also covers the first response
of the stream. The fixture sends that response at once, and the tests expect it
before the deadline. Under load (a loaded machine, with the 19 tests of the
file running at once), the first response took longer:
- the first test failed with its `DeadlineExceeded` at the first message;
- the second resumed past `"first"` and got `["second", "complete"]`.
Now:
- **Both tests take `STREAM_DEADLINE`, a per-RPC deadline of one second.**
That leaves the first response time to arrive under load. The deadline still
ends a stream that stays open after it within the `WAIT` of 3 s of each step.
- **The tests check what they checked.** The first one also checks two more
things:
- the error came after the deadline of the call;
- the execution made a single call, with no reattach (one recorded
`grpc-timeout`).
- The two tests take about a second each, where they took a fraction of one,
and they run in parallel with the others of the file.
### Why are the changes needed?
`reattaches_past_deadlines_are_bounded_as_the_reference_retries` failed once
in a full run of the core's tests on a loaded machine. That is a failure of the
test, not of the client.
### Does this PR introduce _any_ user-facing change?
No. Tests only.
### How was this patch tested?
- **The test binary run 48 times at once**, repeatedly, on a machine at a
load average of about 25 to 32:
| Binary | Runs | Failed | In the first test | In the second test |
|---|---|---|---|---|
| master | 288 | 37 | 32 | 11 |
| the first test's change alone | 276 | 0 | 0 | 0 |
| this PR | 144 | 0 | 0 | 0 |
- **The gates**, on master 6e3a3fc2:
- `cargo fmt --all --check`, clippy 1.100.0 `--all-targets -D warnings`,
and the `cargo doc` gates;
- in debug, all of `cargo test -p apache-spark-connect-core`:
| Target | Passed |
|---|---|
| lib | 258 |
| `artifact_uploads` | 7 |
| `deadlines` | 17 |
| `proxy` | 20 |
| `reattach_cleanup` | 19 |
| `server_session` | 12 |
| `user_context` | 4 |
| `integration_test` | 3 ignored |
- `cargo test -p apache-spark-connect --lib`: 815 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]