Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ allow-branch = ["main"]
sign-commit = true
sign-tag = true
push = false


[profile.perf]
inherits = "release"
debug = 1
4 changes: 4 additions & 0 deletions icechunk-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ default = ["cli"]

[lints]
workspace = true

[profile.perf]
inherits = "release"
debug = 1
11 changes: 6 additions & 5 deletions icechunk/src/storage/object_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl ObjectStorage {
/// Get the client, initializing it if it hasn't been initialized yet. This is necessary because the
/// client is not serializeable and must be initialized after deserialization. Under normal construction
/// the original client is returned immediately.
#[instrument(skip(self))]
#[instrument(skip_all)]
async fn get_client(&self) -> &Arc<dyn ObjectStore> {
self.client
.get_or_init(|| async {
Expand Down Expand Up @@ -283,12 +283,12 @@ impl Storage for ObjectStorage {
true
}

#[instrument(skip(self))]
#[instrument(skip_all)]
fn default_settings(&self) -> Settings {
self.backend.default_settings()
}

#[instrument(skip(self, _settings))]
#[instrument(skip_all)]
async fn fetch_config(
&self,
_settings: &Settings,
Expand Down Expand Up @@ -448,12 +448,12 @@ impl Storage for ObjectStorage {
.await
}

#[instrument(skip(self, _settings))]
#[instrument(skip(self, _settings, bytes))]
async fn write_chunk(
&self,
_settings: &Settings,
id: ChunkId,
bytes: bytes::Bytes,
bytes: Bytes,
) -> Result<(), StorageError> {
let path = self.get_chunk_path(&id);
self.get_client().await.put(&path, bytes.into()).await?;
Expand Down Expand Up @@ -550,6 +550,7 @@ impl Storage for ObjectStorage {
Ok(stream.boxed())
}

#[instrument(skip(self, batch))]
async fn delete_batch(
&self,
prefix: &str,
Expand Down
6 changes: 3 additions & 3 deletions icechunk/src/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl S3Storage {
/// Get the client, initializing it if it hasn't been initialized yet. This is necessary because the
/// client is not serializeable and must be initialized after deserialization. Under normal construction
/// the original client is returned immediately.
#[instrument(skip(self))]
#[instrument(skip_all)]
async fn get_client(&self) -> &Arc<Client> {
self.client
.get_or_init(|| async {
Expand Down Expand Up @@ -330,7 +330,7 @@ impl Storage for S3Storage {
self.can_write
}

#[instrument(skip(self, _settings))]
#[instrument(skip_all)]
async fn fetch_config(
&self,
_settings: &Settings,
Expand Down Expand Up @@ -615,7 +615,7 @@ impl Storage for S3Storage {
}
}

#[instrument(skip(self, _settings))]
#[instrument(skip_all)]
async fn ref_names(&self, _settings: &Settings) -> StorageResult<Vec<String>> {
let prefix = self.ref_key("")?;
let mut paginator = self
Expand Down
14 changes: 7 additions & 7 deletions icechunk/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ impl Store {
Self { session, get_partial_values_concurrency }
}

#[instrument(skip(bytes))]
#[instrument(skip_all)]
pub fn from_bytes(bytes: Bytes) -> StoreResult<Self> {
let session: Session = rmp_serde::from_slice(&bytes).map_err(StoreError::from)?;
let conc = session.config().get_partial_values_concurrency();
Ok(Self::from_session_and_config(Arc::new(RwLock::new(session)), conc))
}

#[instrument(skip(self))]
#[instrument(skip_all)]
pub async fn as_bytes(&self) -> StoreResult<Bytes> {
let session = self.session.write().await;
let bytes = rmp_serde::to_vec(session.deref()).map_err(StoreError::from)?;
Expand All @@ -176,7 +176,7 @@ impl Store {
Arc::clone(&self.session)
}

#[instrument(skip(self))]
#[instrument(skip_all)]
pub async fn read_only(&self) -> bool {
self.session.read().await.read_only()
}
Expand All @@ -186,7 +186,7 @@ impl Store {
Ok(self.list_dir(prefix).await?.next().await.is_none())
}

#[instrument(skip(self))]
#[instrument(skip_all)]
pub async fn clear(&self) -> StoreResult<()> {
let mut repo = self.session.write().await;
Ok(repo.clear().await?)
Expand All @@ -207,7 +207,7 @@ impl Store {
///
/// Currently this function is using concurrency but not parallelism. To limit the number of
/// concurrent tasks use the Store config value `get_partial_values_concurrency`.
#[instrument(skip(self, key_ranges))]
#[instrument(skip_all)]
pub async fn get_partial_values(
&self,
key_ranges: impl IntoIterator<Item = (String, ByteRange)>,
Expand Down Expand Up @@ -266,12 +266,12 @@ impl Store {
exists(key, guard.deref()).await
}

#[instrument(skip(self))]
#[instrument(skip_all)]
pub fn supports_writes(&self) -> StoreResult<bool> {
Ok(true)
}

#[instrument(skip(self))]
#[instrument(skip_all)]
pub fn supports_deletes(&self) -> StoreResult<bool> {
Ok(true)
}
Expand Down