Skip to content

refactor(sea): Client query timeout - split query execution from result materialisation - #337

Merged
cathleeny merged 2 commits into
mainfrom
refactor/split-execution-materialization
Sep 22, 2026
Merged

cathleeny merged 2 commits into
mainfrom
refactor/split-execution-materialization

Conversation

@cathleeny

@cathleeny cathleeny commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • split synchronous SEA execution into a terminal-execution phase and a separate result-materialisation phase
  • include terminal success/error/cancellation mapping in execution; keep DML enrichment and reader/schema creation in materialisation
  • retain the existing enriched status path for async callers and add boundary-focused regression coverage

Why this split

Previously, synchronous execute handled the POST, status polling, terminal mapping, and result-reader construction in one flow. This refactor makes two explicit internal phases: execution covers POST, polling, and terminal-state mapping; result materialisation starts with DML enrichment and reader/schema creation. A stacked PR can therefore bound the complete execution phase with a client query timeout without timing result work.

Compatibility

This is an internal refactor only. It does not change public Rust APIs, the C ABI, SEA requests, polling cadence or timeout, mapped errors, cleanup/cancellation, results, query-ID publication, or telemetry timing.

Validation

  • cargo test --locked --lib client::sea::tests:: — 20 passed
  • cargo test --locked --test v0_execute_wiremock — 22 passed
  • cargo clippy --locked --all-targets -- -D warnings

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: 1 Low

Clean, behavior-preserving refactor that splits SEA sync execution into a raw terminal phase (wait_for_terminal/get_statement_status_raw) and result materialisation, with good new transport-boundary coverage (polled DML enrichment, timeout cleanup, polled terminal failure). Verified parity on enrichment gating, terminal-error orphan-close, and reader handoff — no correctness concerns found. One Low: the close_orphaned_statement phase labels still say "wait_for_completion" (renamed function), weakening the per-phase trace attribution the updated doc comment advertises.

Comment thread src/client/sea.rs Resolved
@cathleeny cathleeny changed the title refactor(sea): split execution from result materialisation refactor(sea): Client query timeout - split execution from result materialisation Sep 14, 2026
@cathleeny
cathleeny force-pushed the refactor/split-execution-materialization branch from 311c85e to d5fe8e4 Compare September 14, 2026 22:05

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@cathleeny cathleeny changed the title refactor(sea): Client query timeout - split execution from result materialisation refactor(sea): Client query timeout - split query execution from result materialisation Sep 14, 2026
@cathleeny
cathleeny added this pull request to stack #340 September 14, 2026 23:11
@cathleeny
cathleeny force-pushed the refactor/split-execution-materialization branch from 7a621d5 to 8afd56e Compare September 16, 2026 21:10

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@cathleeny
cathleeny added this pull request to the merge queue Sep 22, 2026
Merged via the queue into main with commit 54755fc Sep 22, 2026
21 of 22 checks passed

This branch was previously deployed

1 inactive deployment
azure-prod — 4e6529c3 Deployed Sep 17, 2026 by cathleeny via review #598
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants