Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
refactor(storage-opendal): keep the client config accessors crate-pri…
…vate

`OpenDalStorage::client_config()`, `OpenDalClientConfig::io_timeout()` and
`OPENDAL_IO_TIMEOUT_MS_DEFAULT` have no callers outside the crate. Keep them
out of the public API so they can be exposed later without a breaking change.

Co-authored-by: Copilot App <[email protected]>
  • Loading branch information
kevinjqliu and Copilot committed Oct 4, 2026
commit 25612d5725db8ef5371a659722f6c6e5a7f31980
5 changes: 0 additions & 5 deletions crates/storage/opendal/public-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ pub iceberg_storage_opendal::OpenDalStorage::S3
pub iceberg_storage_opendal::OpenDalStorage::S3::client_config: iceberg_storage_opendal::OpenDalClientConfig
pub iceberg_storage_opendal::OpenDalStorage::S3::config: alloc::sync::Arc<opendal_service_s3::config::S3Config>
pub iceberg_storage_opendal::OpenDalStorage::S3::customized_credential_load: core::option::Option<iceberg_storage_opendal::CustomAwsCredentialLoader>
impl iceberg_storage_opendal::OpenDalStorage
pub fn iceberg_storage_opendal::OpenDalStorage::client_config(&self) -> &iceberg_storage_opendal::OpenDalClientConfig
impl core::clone::Clone for iceberg_storage_opendal::OpenDalStorage
pub fn iceberg_storage_opendal::OpenDalStorage::clone(&self) -> iceberg_storage_opendal::OpenDalStorage
impl core::fmt::Debug for iceberg_storage_opendal::OpenDalStorage
Expand Down Expand Up @@ -74,8 +72,6 @@ pub fn iceberg_storage_opendal::CustomAwsCredentialLoader::fmt(&self, f: &mut co
pub struct iceberg_storage_opendal::OpenDalClientConfig
impl iceberg_storage_opendal::OpenDalClientConfig
pub fn iceberg_storage_opendal::OpenDalClientConfig::from_properties(properties: &std::collections::hash::map::HashMap<alloc::string::String, alloc::string::String>) -> iceberg::error::Result<Self>
impl iceberg_storage_opendal::OpenDalClientConfig
pub fn iceberg_storage_opendal::OpenDalClientConfig::io_timeout(&self) -> core::time::Duration
impl core::clone::Clone for iceberg_storage_opendal::OpenDalClientConfig
pub fn iceberg_storage_opendal::OpenDalClientConfig::clone(&self) -> iceberg_storage_opendal::OpenDalClientConfig
impl core::default::Default for iceberg_storage_opendal::OpenDalClientConfig
Expand Down Expand Up @@ -122,4 +118,3 @@ pub fn iceberg_storage_opendal::OpenDalResolvingStorageFactory::serialize<__S>(&
impl<'de> serde_core::de::Deserialize<'de> for iceberg_storage_opendal::OpenDalResolvingStorageFactory
pub fn iceberg_storage_opendal::OpenDalResolvingStorageFactory::deserialize<__D>(__deserializer: __D) -> core::result::Result<Self, <__D as serde_core::de::Deserializer>::Error> where __D: serde_core::de::Deserializer<'de>
pub const iceberg_storage_opendal::OPENDAL_IO_TIMEOUT_MS: &str
pub const iceberg_storage_opendal::OPENDAL_IO_TIMEOUT_MS_DEFAULT: u64
8 changes: 4 additions & 4 deletions crates/storage/opendal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub use resolving::{OpenDalResolvingStorage, OpenDalResolvingStorageFactory};

/// Deadline in milliseconds for one IO operation, and for every method call on a returned
/// reader, writer, lister or deleter. Honored by every [`OpenDalStorage`] backend, where it
/// defaults to [`OPENDAL_IO_TIMEOUT_MS_DEFAULT`].
/// defaults to OpenDAL's `TimeoutLayer` default of 10 seconds.
///
/// Each retry attempt is bounded separately, so it is a per-attempt budget, not a total one.
/// Control operations such as `stat` and `rename` keep OpenDAL's separate 60-second budget,
Expand All @@ -115,7 +115,7 @@ pub const OPENDAL_IO_TIMEOUT_MS: &str = "opendal.io-timeout-ms";

/// Default for [`OPENDAL_IO_TIMEOUT_MS`]. Matches the IO timeout default of OpenDAL's
/// `TimeoutLayer`.
pub const OPENDAL_IO_TIMEOUT_MS_DEFAULT: u64 = 10_000;
const OPENDAL_IO_TIMEOUT_MS_DEFAULT: u64 = 10_000;

/// [`OPENDAL_IO_TIMEOUT_MS_DEFAULT`] as the field type. A zero default fails to compile.
const DEFAULT_IO_TIMEOUT_MS: NonZeroU64 = NonZeroU64::new(OPENDAL_IO_TIMEOUT_MS_DEFAULT).unwrap();
Expand Down Expand Up @@ -146,7 +146,7 @@ impl Default for OpenDalClientConfig {

impl OpenDalClientConfig {
/// Per-attempt deadline for one IO operation, set by [`OPENDAL_IO_TIMEOUT_MS`].
pub fn io_timeout(&self) -> Duration {
pub(crate) fn io_timeout(&self) -> Duration {
Duration::from_millis(self.io_timeout_ms.get())
}
}
Expand Down Expand Up @@ -503,7 +503,7 @@ impl OpenDalStorage {
}

/// Client settings for this backend.
pub fn client_config(&self) -> &OpenDalClientConfig {
pub(crate) fn client_config(&self) -> &OpenDalClientConfig {
match self {
#[cfg(feature = "opendal-memory")]
OpenDalStorage::Memory { client_config, .. } => client_config,
Expand Down