Add sync-first TDS cursor APIs - #306
Draft
Saurabh Singh (saurabh500) wants to merge 2 commits into
Draft
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Saurabh Singh (saurabh500)
changed the base branch from
saurabh500-experimental-tds-perf-baseline
to
dev/saurabh500/tds-cursor-hot-path
August 15, 2026 18:30
5 tasks
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 74171bdf-edce-41bc-83e0-bece80fc85ca
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Layer 3 of a separate experimental performance stack.
Adds explicit non-blocking pull-cursor APIs to
TdsClient:try_next_row_cursortry_read_row_columnCursorPoll::{Ready, Pending}The ready path parses already-buffered ROW/NBCROW headers and common unencrypted non-PLP scalar, string, and binary columns without entering Tokio or constructing an async cursor future. A pending attempt consumes neither transport bytes nor cursor state; callers continue with the existing async
next_row_cursor/read_row_columnmethods.Strict row-at-a-time and column-at-a-time streaming is preserved. This does not batch, prefetch, or materialize whole rows.
Stack parent: #304
Correctness boundaries
TdsReadBufferconsumption only after a complete value is available.Measurement context
A preceding proof-of-concept that synchronously polled cursor futures demonstrated a large opportunity, but depended on executor/waker behavior. This layer replaces that evidence-only mechanism with a cursor-specific, documented TDS state-machine API. Final ODBC throughput is intentionally deferred to the next layer that adopts these APIs.
Related Issues
Related to #304.
Validation
cargo fmt --all -- --checkcargo clippy -p mssql-tds --frozen --all-features --all-targets -- -D warningsRUSTFLAGS='--cfg fuzzing' cargo check -p mssql-tds --libmssql-tdslibrary suite: 1,681 passed; four pre-existing certificate-fixture tests failed becausetests/test_certificates/valid_cert.pemand.derare absentChecklist