Xuanwo commented on issue #9419: URL: https://github.com/apache/opendal/issues/9419#issuecomment-7271491428
*AI-generated reply.* Thanks for the reproducer. It shows exactly how a sparse glob can time out even when every LIST request is fast. `TimeoutLayer` documents `io_timeout` as bounding “fetching a list entry” and applies one timer to each call to the inner lister’s `next()`. For `*/match.parquet`, that call can visit several directories before yielding a match. For `**/match.parquet`, it can read several pages. [TimeoutLayer docs](https://github.com/apache/opendal/blob/c5a3e41666e3e486fbdef68798a4b02456930477/core/layers/timeout/src/lib.rs#L69-L79) · [Lister implementation](https://github.com/apache/opendal/blob/c5a3e41666e3e486fbdef68798a4b02456930477/core/layers/timeout/src/lib.rs#L630-L634) This configuration gives the caller more time to wait for the next list entry and keeps the 500 ms I/O timeout for other operations. ```rust use opendal::{layers::TimeoutLayer, raw::Operation}; use std::time::Duration; let op = op.layer( TimeoutLayer::new() .with_io_timeout(Duration::from_millis(500)) .with_operation_timeout(Operation::List, Duration::from_secs(3)), ); ``` In a virtual-time run of your fixture with 50 ms page requests, both globs timed out at 500 ms. With the 3 s List override, `*/match.parquet` returned the sole match in 1.30 s and `**/match.parquet` returned it in 1.05 s. The per-request deadline you want belongs in the HTTP transport. Restarting the list timer after every page would let the caller wait past its deadline as long as pages kept arriving without a match. Closing this as documented behavior. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
