Skip to content

Conversation

@paraseba
Copy link
Collaborator

This new method in the Repository class computes the total space used by chunks in all snapshots. Only native, pointed chunks are included.

Closes: #836

Copy link
Contributor

@mpiannucci mpiannucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with one question

while let Some(snap_id) = all_snaps.try_next().await? {
let snap = asset_manager.fetch_snapshot(&snap_id).await?;

for manifest_id in snap.manifest_files().map(|mf| mf.id) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth extracting this to be able to get the size of a specific snapshot? Or is that not quite relevant. Wondering if it could be helpful for deciding when to gc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that would be useful, but I don't have an immediate use case. I can add it a bit down the road if that's OK

@paraseba paraseba force-pushed the push-zyzxwqpvlqwk branch from 89ce4cf to f0c5665 Compare March 18, 2025 00:12
This new method in the `Repository` class computes the total space used
by chunks in all snapshots. Only native, pointed chunks are included.

Closes: #836
@paraseba paraseba force-pushed the push-zyzxwqpvlqwk branch from f0c5665 to 0a31293 Compare March 18, 2025 00:18
@paraseba paraseba merged commit 6a9c8f5 into main Mar 18, 2025
6 checks passed
@paraseba paraseba deleted the push-zyzxwqpvlqwk branch March 18, 2025 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calculate repo size

3 participants