Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iroh-blobs): unconditionally delete blobs #2692

Merged
merged 6 commits into from
Sep 3, 2024
Merged

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Sep 3, 2024

  • always delete hashes, even if they are protected when calling Store::delete
  • move gc loop implementation into the stores

Breaking Changes

  • removed Store::gc_sweep
  • removed Store::gc_mark
  • removed Store::gc_start
  • added Store::gc_run which starts the full gc schedule

Closes #2657

Copy link

github-actions bot commented Sep 3, 2024

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2692/docs/iroh/

Last updated: 2024-09-03T14:34:25Z

@dignifiedquire dignifiedquire changed the title [WIP] fix blob deletion Fix blob deletion Sep 3, 2024
@dignifiedquire dignifiedquire marked this pull request as ready for review September 3, 2024 13:31
Copy link
Contributor

@rklaehn rklaehn left a comment

Choose a reason for hiding this comment

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

Not a big fan of multiple callbacks that return futures. But then again this wasn't exactly beautiful before either...

@@ -627,6 +630,11 @@ pub(crate) enum ActorMessage {
hashes: Vec<Hash>,
tx: oneshot::Sender<ActorResult<()>>,
},
/// Modification method: try to delete the data for a number of hashes
Copy link
Contributor

Choose a reason for hiding this comment

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

This docs should probably say that GcDelete is not "force delete".

@@ -2253,7 +2371,11 @@ impl ActorState {
tx.send(res).ok();
}
ActorMessage::Delete { hashes, tx } => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have just added the force flag to the Delete message, but this works as well...

Copy link
Contributor

@rklaehn rklaehn left a comment

Choose a reason for hiding this comment

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

Not a big fan of multiple callbacks that return futures. But then again this wasn't exactly beautiful before either...

@dignifiedquire dignifiedquire changed the title Fix blob deletion fix(iroh-blobs): unconditionally delete blobs Sep 3, 2024
@dignifiedquire dignifiedquire added this pull request to the merge queue Sep 3, 2024
@dignifiedquire dignifiedquire added this to the v0.25.0 milestone Sep 3, 2024
Merged via the queue into main with commit 567577d Sep 3, 2024
27 of 30 checks passed
@dignifiedquire dignifiedquire self-assigned this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

in some (most) cases blobs delete blob <hash> seems to do nothing
2 participants