Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
52c59e1
feat(volume): complete Volume PUT, GET and REMOVE in the kernel core
aakash-saravanan-db Dec 1, 2026
beefd52
fix(volume): run each transfer at most once and stream uploads by offset
aakash-saravanan-db Dec 1, 2026
e886bde
fix(volume): recheck new destinations and refuse transfers on attache…
aakash-saravanan-db Dec 1, 2026
12be731
docs(volume): state what a transfer requires of its caller
aakash-saravanan-db Dec 1, 2026
6080a3c
fix(volume): refuse completion once a stream is read to the end
aakash-saravanan-db Dec 1, 2026
f303a57
fix(volume): confirm opened files on Unix and run Volume statements live
aakash-saravanan-db Dec 1, 2026
7a2ea6c
fix(volume): infer the Windows test buffer type and drop the live Vol…
aakash-saravanan-db Dec 1, 2026
964eef2
test(volume): allow the unused mut on Windows in the size-less source…
aakash-saravanan-db Dec 1, 2026
dbdbfa7
docs(volume): state that a GET decodes a gzip Content-Encoding
aakash-saravanan-db Dec 1, 2026
38ac5a1
docs(volume): state the allowed-directory assumption on every platform
aakash-saravanan-db Dec 1, 2026
23cb9c6
fix(volume): transfer regular local files only and check paths once
aakash-saravanan-db Dec 1, 2026
703952a
fix(volume): apply the session's revocation policy to storage connect…
aakash-saravanan-db Dec 1, 2026
e4687ec
fix(volume): write a new GET destination once and keep directory OS e…
aakash-saravanan-db Dec 1, 2026
9e0b472
feat(volume): let a GET write into an existing pipe or character device
aakash-saravanan-db Dec 1, 2026
76555ee
fix(volume): never retry a partial write into a pipe and settle temp …
aakash-saravanan-db Dec 2, 2026
2e2c34d
fix(volume): allow the unused mut on Windows for the download builder
aakash-saravanan-db Dec 2, 2026
5a99db6
fix(volume): bound a download's final flush by the idle limit
aakash-saravanan-db Dec 2, 2026
2832721
fix(volume): keep only the transfer's outcome for an execution
aakash-saravanan-db Dec 2, 2026
fc22242
fix(volume): take caller-supplied upload bytes as Bytes
aakash-saravanan-db Dec 2, 2026
4c7d412
fix(volume): run transfers on runtime threads and copy when rename fails
aakash-saravanan-db Dec 2, 2026
d405efc
test(volume): cover completion after the parent statement is dropped
aakash-saravanan-db Dec 2, 2026
b5aa199
fix(volume): fail redirect policy errors without retrying
aakash-saravanan-db Dec 2, 2026
0f32c65
fix(volume): let a stream's transfer outlive its async handle and tri…
aakash-saravanan-db Dec 2, 2026
9fb0197
fix(volume): keep rustix at 1.1.6 now that tempfile is a direct depen…
aakash-saravanan-db Dec 2, 2026
4199670
fix(volume): run transfers on the session runtime
aakash-saravanan-db Dec 2, 2026
7bf9027
fix(volume): read a blank headers string as no storage headers
aakash-saravanan-db Dec 2, 2026
e18d76e
refactor(volume): run the transfer inside execution and fix two GET e…
aakash-saravanan-db Dec 2, 2026
31adbbc
fix(volume): keep OS codes for new GET files and stop transfers on drop
aakash-saravanan-db Dec 2, 2026
751ac2c
fix(volume): let concurrent calls share an input-stream PUT
aakash-saravanan-db Dec 2, 2026
bc42206
fix(volume): fail an unmarked Volume command and write refusing folde…
aakash-saravanan-db Dec 2, 2026
27e2659
fix(volume): record a failed unmarked check and match whole keywords
aakash-saravanan-db Dec 2, 2026
3d5ceeb
refactor(volume): drop the check for unmarked PUT, GET and REMOVE
aakash-saravanan-db Dec 3, 2026
655e55e
docs(volume): drop comments that restate the code
aakash-saravanan-db Dec 3, 2026
d4f6c3f
ci: drop the Windows Volume test job
aakash-saravanan-db Dec 3, 2026
02664c8
refactor(volume): put new fields last and fix the transfer trigger doc
aakash-saravanan-db Dec 3, 2026
c2eef32
refactor(volume): stop following storage redirects
aakash-saravanan-db Dec 3, 2026
6df247e
refactor(volume): create a new GET destination directly
aakash-saravanan-db Dec 3, 2026
055e0ec
refactor(volume): use request_timeout as the transfer idle limit
aakash-saravanan-db Dec 3, 2026
f399c3f
refactor(volume): upload a regular file by its reported length
aakash-saravanan-db Dec 3, 2026
f66947e
docs(kernel_error): say a struct literal must set a new Error field
aakash-saravanan-db Dec 3, 2026
4eaeb61
fix(deps): require tempfile 3.27 for TempPath::try_from_path
aakash-saravanan-db Dec 3, 2026
c5e2b30
fix(volume): stop a shared transfer only when its owner gives up
aakash-saravanan-db Dec 3, 2026
8790496
fix(statement): close the server statement when a sync execute fails
aakash-saravanan-db Dec 3, 2026
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
2 changes: 1 addition & 1 deletion CONNECTION_PARAMETERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ 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 Volume file transfers, an idle limit: a transfer fails after this long without progress. | `120s` |
| `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.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ lz4_flex = "0.14"
# Random number generation (retry jitter)
rand = "0.10"

# Temporary files for Volume GET downloads
tempfile = "3.27"

# Concurrent data structures
dashmap = "6"
moka = { version = "0.12.16", features = ["future"] }
Expand Down Expand Up @@ -181,7 +184,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
8 changes: 8 additions & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@ changes go in their respective binding's NEXT_CHANGELOG.
if the host has credentials, a path, query or fragment.
- `ProxyConfig.url`, the Rust ADBC driver's `adbc.databricks.proxy.url`,
`HTTPS_PROXY` and `ALL_PROXY` accept SOCKS4 and SOCKS5 proxy URLs.
- Volume `PUT`, `GET` and `REMOVE`: with `StatementSpec::volume` set, executing
a statement the server marks as a Volume operation also runs its file
transfer. Local paths, with symlinks resolved, must be inside the caller's
allowed directories. A transfer fails after `HttpConfig::request_timeout`
without progress. On Unix a GET can also write into an existing pipe or
character device as the download arrives.

### Changed

- Proxy credentials are redacted from proxy URLs in errors, logs and `Debug`
output.
- `Error` and `ResultManifest` have new public fields (`local_error`,
`is_volume_operation`). Code that builds them with struct literals must set them.

### Updated

Expand Down
5 changes: 5 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ Project URL: https://github.com/jedisct1/rust-siphash
Copyright: Copyright 2012-2016 The Rust Project Developers; Copyright 2016-2026 Frank Denis


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
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 @@ -162,6 +162,11 @@ Project URL: https://github.com/jedisct1/rust-siphash
Copyright: Copyright 2012-2016 The Rust Project Developers; Copyright 2016-2026 Frank Denis


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.

30 changes: 24 additions & 6 deletions src/client/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,14 @@ impl DatabricksHttpClient {
let revocation = revocation.filter(|_| config.tls.allow_self_signed != Some(true));

// Follow redirects for normal traffic (reqwest's default policy).
let client =
Self::build_reqwest_client(&config, reqwest::redirect::Policy::default(), revocation)?;
// `read_timeout` is a historical name; reqwest applies it as the
// total deadline from connect through response-body completion.
let client = Self::build_reqwest_client(
&config,
reqwest::redirect::Policy::default(),
revocation,
Some(config.read_timeout),
)?;

// Surface which TLS backend was compiled in so oncall debugging
// a handshake / unknown-CA report can tell at a glance whether
Expand All @@ -589,7 +595,8 @@ impl DatabricksHttpClient {
})
}

/// Build a `reqwest::Client` from `config` with the given redirect policy.
/// Build a `reqwest::Client` from `config` with the given redirect policy
/// and total request timeout.
///
/// Factored out of `new()` so tenant discovery can obtain a client that
/// does NOT follow redirects (to read the first `/aad/auth` hop's
Expand All @@ -599,16 +606,17 @@ impl DatabricksHttpClient {
config: &HttpClientConfig,
redirect: reqwest::redirect::Policy,
revocation: Option<bool>,
timeout: Option<Duration>,
) -> Result<Client> {
check_revocation_support(&config.tls, revocation)?;
let mut builder = Client::builder()
.connect_timeout(config.connect_timeout)
// `read_timeout` is a historical name; reqwest applies this as
// the total deadline from connect through response-body completion.
.timeout(config.read_timeout)
.pool_max_idle_per_host(config.max_connections_per_host)
.user_agent(&config.user_agent)
.redirect(redirect);
if let Some(timeout) = timeout {
builder = builder.timeout(timeout);
}

// Apply TLS configuration
if config.tls.enabled == Some(false) {
Expand Down Expand Up @@ -837,6 +845,15 @@ impl DatabricksHttpClient {
.expect("Auth provider can only be set once");
}

/// Build the client for Volume storage requests: the session's connection
/// settings without a total deadline or redirect following.
pub(crate) fn storage_client(
config: &HttpClientConfig,
revocation: Option<bool>,
) -> Result<Client> {
Self::build_reqwest_client(config, reqwest::redirect::Policy::none(), revocation, None)
}

/// Returns the client configuration.
pub fn config(&self) -> &HttpClientConfig {
&self.config
Expand Down Expand Up @@ -926,6 +943,7 @@ impl DatabricksHttpClient {
&self.config,
reqwest::redirect::Policy::none(),
self.revocation,
Some(self.config.read_timeout),
)?;
let response = client.get(url).send().await.map_err(|e| {
Error::network_error().message(format!("Redirect-probe request to {url} failed: {e}"))
Expand Down
2 changes: 1 addition & 1 deletion src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub mod sea;
pub(crate) mod tls_revocation;
pub(crate) mod transport;

fn error_chain<'a>(
pub(crate) fn error_chain<'a>(
error: &'a (dyn std::error::Error + 'static),
) -> impl Iterator<Item = &'a (dyn std::error::Error + 'static)> {
std::iter::successors(Some(error), |error| {
Expand Down
1 change: 1 addition & 0 deletions src/client/sea.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2454,6 +2454,7 @@ mod tests {
chunks: None,
result_compression: Some("LZ4_FRAME".to_string()),
is_native_metadata_result: None,
is_volume_operation: false,
}),
result: None,
};
Expand Down
2 changes: 2 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,8 @@ pub struct HttpConfig {
/// Total timeout for one HTTP request, from connection start through
/// response-body completion. A separate 30-second connection timeout also
/// applies, so connection establishment is bounded by the shorter limit.
/// For a Volume file transfer it is an idle limit instead: the transfer
/// fails after this long without progress.
pub request_timeout: Duration,

/// Maximum total time across retries for a single logical RPC.
Expand Down
Loading
Loading