Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,32 @@ jobs:
# a live workspace; `rust-e2e.yml` runs them separately.
run: cargo test --workspace

volume-windows:
name: Volume tests (Windows)
runs-on:
group: databricks-protected-runner-group
labels: [windows-server-latest]
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: ./.github/actions/setup-public-package-proxies
with:
cargo: "true"

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
with:
toolchain: stable

- name: Set up MSVC environment
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1
with:
arch: x64

- name: Volume file and cancellation tests
shell: pwsh
run: cargo test --locked --lib volume::tests

c-abi:
name: C ABI smoke test
runs-on:
Expand Down
3 changes: 2 additions & 1 deletion CONNECTION_PARAMETERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ until implemented) and `External` (a caller-supplied `TokenProvider`).

| Field | Description | Default |
|-------|-------------|---------|
| `request_timeout` | Per-request timeout (connect + body). | `120s` |
| `request_timeout` | Per-request timeout (connect + body) for SQL requests. Volume file transfers are limited by storage_read_timeout instead. | `120s` |
| `storage_read_timeout` | Idle limit for Volume file transfers: a transfer fails after this long without progress. | `Some(900s)` (15 minutes); `None` disables the limit |
| `overall_timeout` | Maximum total time across retries for one logical RPC. | `900s` |
| `pool_max_idle_per_host` | Connection-pool size (max idle warm sockets per host). Raise for bursty concurrent workloads. | `100` |
| `retry_min_wait` | Minimum backoff between retries; also the floor for a server `Retry-After` and the base of exponential backoff (`min_wait × 2^attempt`). | `1s` |
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ moka = { version = "0.12.16", features = ["future"] }

# Async utilities
futures = "0.3"
tokio-util = "0.7"
tokio-util = { version = "0.7", features = ["io"] }
async-trait = "0.1"

# Temporary file that holds a Volume GET download before it is copied into place
tempfile = "3"

# Error handling
thiserror = "2"

Expand Down Expand Up @@ -167,7 +170,6 @@ libc = "0.2"
[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util"] }
wiremock = "0.6"
tempfile = "3"
log = "0.4"
# Generate JWT test keys in-process to avoid PEM fixtures and an external
# `openssl` dependency. `ring` already backs runtime JWT signing.
Expand Down
11 changes: 11 additions & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,19 @@ changes go in their respective binding's NEXT_CHANGELOG.

### Added

- Volume `PUT`, `GET` and `REMOVE`: `ResultStream::complete_volume_operation`
runs the file transfer. Local paths, and the files they resolve to through
symlinks, must be inside the caller's allowed directories. A `PUT` can also
upload bytes the caller supplies.

### Changed

- Volume file transfers default to a 15-minute idle limit. Set
`HttpConfig::storage_read_timeout` to `None` for no limit.
- Adds public fields to `Error` and `ResultManifest`. Code that builds these
structs with struct literals must be updated. Supported consumers are the PyO3,
NAPI, C ABI and ADBC bindings.

### Updated

### Fixed
Expand Down
5 changes: 5 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ Project URL: https://github.com/serde-rs/json
Copyright: Copyright serde_json Authors.


Package: tempfile
Project URL: https://github.com/Stebalien/tempfile
Copyright: Copyright (c) 2015 Steven Allen


Package: thiserror
Project URL: https://github.com/dtolnay/thiserror
Copyright: Copyright thiserror Authors.
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ and security vulnerabilities should be reported according to
[SECURITY.md](SECURITY.md). For other project questions, contact
[eng-oss-sql-driver@databricks.com](mailto:eng-oss-sql-driver@databricks.com).

## Volume file operations

For a Volume `PUT`, `GET` or `REMOVE`, call
`ResultStream::complete_volume_operation` before reading rows. It runs the
file transfer; without it the result is only the server's instruction row.
See [`ResultStream::complete_volume_operation`](https://docs.rs/databricks-sql-kernel/latest/databricks_sql_kernel/struct.ResultStream.html#method.complete_volume_operation)
for transfer behavior.

## License

Apache 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
5 changes: 3 additions & 2 deletions adbc/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions adbc/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ Project URL: https://github.com/serde-rs/json
Copyright: Copyright serde_json Authors.


Package: tempfile
Project URL: https://github.com/Stebalien/tempfile
Copyright: Copyright (c) 2015 Steven Allen


Package: thiserror
Project URL: https://github.com/dtolnay/thiserror
Copyright: Copyright thiserror Authors.
Expand Down
39 changes: 39 additions & 0 deletions napi/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions pyo3/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading