fix(io): stop ignoring storage configuration that lance accepts #10008
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.
✅ Gate recommendation: approve.
No blocking issues found. The focused retry, throttle configuration, and credential-provider regression tests passed.
suggestion: could we use the IOTrackingStore here instead, instead of defining a whole new one?
Approved these changes.
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.
Approved these changes.
Thank you @wjones127
wjones127
LuciferYang
Three settings in
lance-iothat are read and then not honored, all described in #10005.AimdThrottleState::newnow rejects a backoff range it cannot sample, so a range likelance_aimd_min_backoff_ms=500against 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_rangenow goes throughdo_get_with_outer_retry, the loopget_allalready uses, so a body that stops partway is retrieddownload_retry_counttimes while the request keeps the three retriesdo_with_retrygives 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 andtakeuses. Routing it through the existing loop also means the operator-facing warning about an overloaded store now covers ranged reads.build_opendal_s3_storenow rejects an explicitaws_credentialsprovider next to theprovider_schemerejection 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_idand friends, so those keys and the dynamicstorage_options_accessorare 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_rangecovers 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_boundspins that equal bounds, a one-value range, are still accepted, andtest_shared_throttle_state_ignores_the_backoff_range_when_disabledpins that turning retries off keeps a store with those values opening. Before the fix the first two cases returnOk; a throwaway test confirmed the panic they stand in for,cannot sample empty rangeatthrottle.rs:503, from onelance_aimd_min_backoff_ms=500.get_range_retries_a_partial_download_as_configureddrives a store whose request succeeds and whose body then fails, countingget_optscalls fordownload_retry_countof 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_alonedrives 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_providerasserts the variant and the message.