Skip to content

Commit

Permalink
nydus-image: merge main branch and remove unnecessary output.
Browse files Browse the repository at this point in the history
  • Loading branch information
cslinwang committed Mar 11, 2024
1 parent 00ce305 commit 6093309
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/bin/nydus-image/deduplicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ pub fn update_ctx_from_parent_bootstrap(
ctx.conversion_type = ConversionType::TarToTarfs;
ctx.blob_features |= BlobFeatures::TARFS;
}
ctx.fs_version =
RafsVersion::try_from(sb.meta.version).context("Failed to get RAFS version")?;
ctx.compressor = config.compressor;

Ok(())
}
Expand Down Expand Up @@ -1306,7 +1309,7 @@ impl Table<ChunkdictBlobInfo, DatabaseError> for BlobTable {
.lock()
.map_err(|e| DatabaseError::PoisonError(e.to_string()))?;
let mut stmt: rusqlite::Statement<'_> = conn_guard.prepare(
"SELECT blob_id, blob_compressed_size, blob_uncompressed_size from blob
"SELECT blob_id, blob_compressed_size, blob_uncompressed_size, blob_compressor, blob_meta_ci_compressed_size, blob_meta_ci_uncompressed_size, blob_meta_ci_offset from blob
ORDER BY id LIMIT ?1 OFFSET ?2",
)?;
let blob_iterator = stmt.query_map(params![limit, offset], |row| {
Expand Down
9 changes: 8 additions & 1 deletion src/bin/nydus-image/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,14 @@ impl Command {
chunkdict_chunks,
chunkdict_blobs,
)?;
OutputSerializer::dump(matches, output, build_info).unwrap();
OutputSerializer::dump(
matches,
output,
build_info,
build_ctx.compressor,
build_ctx.fs_version,
)
.unwrap();
info!(
"Chunkdict metadata is saved at: {:?}",
matches
Expand Down

0 comments on commit 6093309

Please sign in to comment.