Repository navigation
Conversation
There was a problem hiding this comment.
Verdict: 1 Medium
Solid, well-tested feature. The timeout plumbing, HYT00/retryable=false error contract, background cleanup (defuse + dispatch_timeout_cleanup avoids double-cancel), C-ABI deadline capture, and Duration::ZERO/MAX sentinels all look correct, and the wiremock/C-ABI coverage is thorough. One medium concern: removing the poll_timeout ceiling from wait_for_terminal also un-bounds all metadata queries (which pass None and have no timeout escape hatch), not just the intended execute() path.
There was a problem hiding this comment.
Verdict: 1 Medium
Solid, well-tested change — the absolute client deadline is applied correctly via timeout_at, the mid-execute cancel guard is defused before dispatching bounded background cleanup (so no double-cancel), and coverage spans Rust/wiremock/C-ABI tiers including reuse and range validation. One medium note: gating the internal poll ceiling on ExecuteMetadataQuery removes the previously-unconditional 600s bound from the default synchronous execute() path, so callers who supply no timeout can now block indefinitely — intentional and documented, but a public-contract change worth confirming.
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — the execution-scoped client timeout is implemented carefully and thoroughly tested. The grace-vs-poll-sleep distinction, post-deadline no-new-poll guard, guard.defuse() + async cleanup handoff (avoiding double-cancel), and preservation of the default/metadata 600s ceiling all check out, with matching wiremock and C ABI coverage. Only one minor convention gap: the new public/ABI surface isn't recorded under the changelog's Added section.
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — the execution-scoped client timeout is implemented carefully and matches the documented semantics (absolute deadline through terminal mapping, no new poll after the deadline, a bounded 5s grace for an in-flight status RPC, materialisation excluded, background cancel/close cleanup). The ExecutionTimeout threading through Transport, metadata queries kept on Default, and the reuse/idempotency behavior are all well covered by the new wiremock and C-ABI tests. One low-severity note on query-id resolution under lock contention posted inline.
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
bfa6b60 to
6ca3f80
Compare
There was a problem hiding this comment.
Verdict: 1 Low
Solid, thorough PR — the client-deadline state machine (outer timeout_at, one-shot in-flight status grace, dual deadline checks in wait_for_terminal, terminal-FAILED-wins-during-grace, background bounded cleanup) is logically consistent and well covered by the new wiremock/C-ABI tests. No correctness or lifecycle bug found; default/metadata/async paths correctly retain the 600s ceiling and synchronous cleanup, and the C cap matches the Rust constant. One Low inline note on a swallowed poisoned-lock query-id read. Nits (not filed inline): the query-id extraction block is duplicated at sea.rs:841–844 and 852–855, and the pre-/post-sleep deadline checks in wait_for_terminal are near-identical — both are candidates for a small helper to reduce drift risk."
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
Summary
Statement::execute_with_timeout(Duration)andkernel_statement_execute_with_timeout_msTimeout/HYT00/retryable=false, with the query ID when known; run bounded cancel/close cleanup in the backgroundSemantics
Statement::execute/kernel_statement_execute0or RustDuration::ZERO/Duration::MAXAn absent timeout must use the existing API; it must not be translated to
0. At a finite deadline, no new status poll starts. A status RPC already in flight may finish within five seconds; a terminal result wins during that grace period, otherwise execution returnsHYT00.The client deadline excludes result materialisation/fetching and is never sent to the server. C finite values are capped at
9_223_372_036_854ms. Async handles and metadata queries remain unchanged at 600s.Validation
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test --lib(949 passed)