← Back to Pull requests

fix(io): stop ignoring storage configuration that lance accepts #10008

Merged
LuciferYang merged 3 files (291 lines) on Oct 19, 2026 20:36 UTC
View on GitHub
LuciferYang LuciferYang commented on Oct 15, 2026 10:53 UTC
Author

Three settings in lance-io that are read and then not honored, all described in #10005.

AimdThrottleState::new now rejects a backoff range it cannot sample, so a range like lance_aimd_min_backoff_ms=500 against the default maximum of 300 fails while the store is being built instead of panicking on the first throttled request. The check sits with the sampler rather than with the option parser, so a configuration that disables retries entirely keeps opening as it does today, and a config built in code cannot get past it either.

Reader::get_range now goes through do_get_with_outer_retry, the loop get_all already uses, so a body that stops partway is retried download_retry_count times while the request keeps the three retries do_with_retry gives it. The default is 3, which is what that loop was hardcoded to, so the default path makes the same four attempts it made before; what changes is that raising or lowering the setting now reaches the path every scan and take uses. Routing it through the existing loop also means the operator-facing warning about an overloaded store now covers ranged reads.

build_opendal_s3_store now rejects an explicit aws_credentials provider next to the provider_scheme rejection that is already there, rather than signing requests with credentials OpenDAL resolved for itself.

Worth a reviewer's attention: that last rejection does not make the OpenDAL arm safe for credentials in general. OpenDAL's S3 config reads unprefixed key names while lance's canonical spellings are aws_access_key_id and friends, so those keys and the dynamic storage_options_accessor are dropped by that arm too. The last paragraph of #10005 records it; this change covers the one channel with a typed API.

Fixes #10005.

How was this patch tested

test_shared_throttle_state_rejects_an_unsamplable_backoff_range covers both an inverted explicit pair and a minimum raised above the default maximum, which is the single-option case. test_shared_throttle_state_accepts_equal_backoff_bounds pins that equal bounds, a one-value range, are still accepted, and test_shared_throttle_state_ignores_the_backoff_range_when_disabled pins that turning retries off keeps a store with those values opening. Before the fix the first two cases return Ok; a throwaway test confirmed the panic they stand in for, cannot sample empty range at throttle.rs:503, from one lance_aimd_min_backoff_ms=500.

get_range_retries_a_partial_download_as_configured drives a store whose request succeeds and whose body then fails, counting get_opts calls for download_retry_count of 0, 1, 3 and 10. The 0, 1 and 10 cases fail against the hardcoded loop, which always makes four attempts; the 3 case passes either way, which is the point about the default. get_range_leaves_the_request_retries_alone drives a store whose request never succeeds and pins four attempts with the setting at 10, so the setting cannot stretch or shrink the request layer.

test_use_opendal_rejects_an_explicit_credential_provider asserts the variant and the message.

Diff: 291 lines (+286 / -5) across 3 files Reviewer: wjones127 Review duration: 6342m
All Vouch review confidence checks passed
Residual risk 0.10 = Change Risk (0.63) × (1 − Review Confidence (0.84)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 291 lines diff across 3 files
0.63
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.77 · 3 substantive comment(s)
0.77
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
83%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.340
Sensitive Paths sensitive_paths
0.063
Real PR Conversation Timeline
8 items
claude[bot] claude[bot] commented on Oct 15, 2026 10:54 UTC
Reviewer

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

lance-gatekeeper[bot] lance-gatekeeper[bot] commented on Oct 15, 2026 10:57 UTC
Reviewer

✅ Gate recommendation: approve.

No blocking issues found. The focused retry, throttle configuration, and credential-provider regression tests passed.

wjones127 wjones127 commented on code on Oct 17, 2026 23:21 UTC
Code Review
rust/lance-io/src/object_reader.rs:1
@@ -461,3 +474,165 @@ impl DeepSizeOf for SmallReader {
         size
     }
 }
+
+#[cfg(test)]
+mod tests {
+    use std::fmt::{Debug, Display, Formatter};
+    use std::sync::atomic::{AtomicUsize, Ordering};
+
+    use futures::stream::BoxStream;
+    use object_store::memory::InMemory;
+    use object_store::{
+        Attributes, CopyOptions, GetResult, GetResultPayload, ListResult, MultipartUpload,
+        ObjectMeta, ObjectStore, PutMultipartOptions, PutOptions, PutPayload, PutResult,
+        Result as OSResult, path::Path,
+    };
+    use rstest::rstest;
+
+    use super::*;
+
+    fn failure() -> object_store::Error {
+        object_store::Error::Generic {
+            store: "CountingStore",
+            source: "connection reset".into(),
+        }
+    }
+
+    /// Counts `get_opts` calls, and fails either the request or the body it
+    /// hands back, so the counts separate the two retry layers.
+    struct CountingStore {

suggestion: could we use the IOTrackingStore here instead, instead of defining a whole new one?

wjones127 wjones127 approved these changes on Oct 17, 2026 23:21 UTC
Approved Reviewer

Approved these changes.

LuciferYang LuciferYang commented on code on Oct 18, 2026 13:15 UTC
Code Review
rust/lance-io/src/object_reader.rs:1
@@ -461,3 +474,165 @@ impl DeepSizeOf for SmallReader {
         size
     }
 }
+
+#[cfg(test)]
+mod tests {
+    use std::fmt::{Debug, Display, Formatter};
+    use std::sync::atomic::{AtomicUsize, Ordering};
+
+    use futures::stream::BoxStream;
+    use object_store::memory::InMemory;
+    use object_store::{
+        Attributes, CopyOptions, GetResult, GetResultPayload, ListResult, MultipartUpload,
+        ObjectMeta, ObjectStore, PutMultipartOptions, PutOptions, PutPayload, PutResult,
+        Result as OSResult, path::Path,
+    };
+    use rstest::rstest;
+
+    use super::*;
+
+    fn failure() -> object_store::Error {
+        object_store::Error::Generic {
+            store: "CountingStore",
+            source: "connection reset".into(),
+        }
+    }
+
+    /// Counts `get_opts` calls, and fails either the request or the body it
+    /// hands back, so the counts separate the two retry layers.
+    struct CountingStore {

Partly, in 1978899c1. IoTrackingStore now does the counting in the partial-body test, but it can't make a body fail, so a small PartialBodyStore stays to hand back a failing stream (its other methods are unimplemented!). IoTrackingStore also records only requests that succeed, so the request-failure test counts through a ProxyObjectStore policy instead.

wjones127 wjones127 approved these changes on Oct 19, 2026 20:36 UTC
Approved Reviewer

Approved these changes.

LuciferYang LuciferYang commented on Oct 20, 2026 03:21 UTC
Author

Thank you @wjones127

Reviewers
Assignees
LuciferYang LuciferYang
Labels
risk: low confidence: 83.9% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 63.1% (MEDIUM) · Higher = larger blast radius
63.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 83.9% · Lower = rushed or shallow review
83.9%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 10.1% · Safe to merge
10.1%