{"record":{"id":"e5e2eb9da1c5dd8a","repo":"pola-rs/polars","slug":"invalid-value-for-polars-inflight-floor-request-bu","errorCode":null,"errorMessage":"invalid value for POLARS_INFLIGHT_FLOOR_REQUEST_BUDGET: {x}","messagePattern":"invalid value for POLARS_INFLIGHT_FLOOR_REQUEST_BUDGET: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-io/src/cloud/concurrency/mod.rs","lineNumber":154,"sourceCode":"            x.parse::<NonZeroU64>()\n                .unwrap_or_else(|_| panic!(\"invalid value for POLARS_INFLIGHT_REQUEST_BUDGET: {x}\"))\n                .get()\n        })\n        .unwrap_or(512)\n        .max(1)\n}\n\n/// Minimum number of requests concurrently in flight, if demand is there.\npub fn get_floor_request_budget() -> u64 {\n    // Since object_store/reqwest use HTTP/1 with a connection pool, this value controls the\n    // max concurrent TCP sessions to S3 for the pipeline.\n    // When modifying this value, consider the max_thread count configuration(s), the OS limitations\n    // (e.g., ulimit -n), and any cloud infrastructure limitations.\n    std::env::var(\"POLARS_INFLIGHT_FLOOR_REQUEST_BUDGET\")\n        .map(|x| {\n            x.parse::<NonZeroU64>()\n                .unwrap_or_else(|_| {\n                    panic!(\"invalid value for POLARS_INFLIGHT_FLOOR_REQUEST_BUDGET: {x}\")\n                })\n                .get()\n        })\n        .unwrap_or(polars_config::config().max_threads() as u64)\n        .max(1)\n}\n\n/// Windowed round-trip time of 0-byte metadata (HEAD) requests.\n/// Diagnostic only, not to be used for BDP estimation.\n#[derive(Debug)]\npub struct HeadRttChannel {\n    min_ns: AtomicU64,\n    sum_ns: AtomicU64,\n    count: AtomicU64,\n    /// Never reset, unlike `count`: distinguishes the first request of the process from\n    /// the first of a window.\n    total: AtomicU64,\n}","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/pola-rs/polars/blob/68506541d2de983056c9eb244e1ea05fab377dfc/crates/polars-io/src/cloud/concurrency/mod.rs#L136-L172","documentation":"Panics in get_floor_request_budget() when POLARS_INFLIGHT_FLOOR_REQUEST_BUDGET cannot be parsed as a NonZeroU64. The floor keeps a minimum number of concurrent requests during backpressure; the panic is purely an env-var parse failure, not a runtime concurrency error.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"invalid value for POLARS_INFLIGHT_FLOOR_REQUEST_BUDGET: {x}\". Typical triggers: unsupported dtype or feature-gated code path reached at runtime, invalid user input or environment variable value, calling API methods in the wrong order or on mismatched types, or data (lengths, offsets, ranges) violating the function's preconditions.","commonSituations":"Encountered when input data or configuration does not meet the preconditions of the throwing code path (\"invalid value for POLARS_INFLIGHT_FLOOR_REQUEST_BUDGET: {x}\"). Common cases: missing Cargo feature flags, mismatched dtypes/lengths between arrays or series, out-of-range temporal values, malformed environment variables, or operations on unsupported/complex nested types.","solutions":["Set POLARS_INFLIGHT_FLOOR_REQUEST_BUDGET to a valid positive integer.","Unset the variable to use the default floor request budget."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"68506541d2de983056c9eb244e1ea05fab377dfc","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}