-
Notifications
You must be signed in to change notification settings - Fork 165
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
refactor: Fallible store traits #2005
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hash HashAndFormat BlobFormat
Use Self::POSTCARD_MAX_SIZE for fixed size
...to allow for stores that use io even for the lookup, such as a redb store. Also use iroh_base::Hash instead of blake3::Hash, and make gc delete use batches.
rklaehn
commented
Feb 7, 2024
let size = entry.outboard().await.ok()?.tree().size().0; | ||
let path = "".to_owned(); | ||
Some(BlobListResponse { hash, size, path }) | ||
Gen::new(|co| async move { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this pattern is so common that we might want to do a helper for it. But maybe not just yet. It isn't that long.
rklaehn
commented
Feb 7, 2024
# Conflicts: # iroh-bytes/src/get/db.rs # iroh/src/downloader/get.rs
rklaehn
force-pushed
the
fallible-store-traits
branch
from
February 7, 2024 13:55
4e7d93d
to
76ef755
Compare
rklaehn
changed the title
Refactor: Fallible store traits
refactor: Fallible store traits
Feb 7, 2024
# Conflicts: # iroh/src/client.rs # iroh/src/node.rs # iroh/src/rpc_protocol.rs
dignifiedquire
approved these changes
Feb 8, 2024
3 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 12, 2024
## Description I did a a PR to merge the batch writer change. But it somehow got lost. #2007 It was targeted to [fallible-store-traits](#2005), which got merged to main. I would have expected github to retarget the PR to main, but apparently it did not do that. Maybe I made a mistake, not sure exactly. So here we go again. ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant.
fubuloubu
pushed a commit
to ApeWorX/iroh
that referenced
this pull request
Feb 21, 2024
## Description This makes the store traits fallible, which is a precondition for wiring up a store that uses IO for the blob index, such as the redb store. There will be more changes to the traits, but this is necessary in any case and also a bit painful, so let's get it out of the way. This also needs to extend the list-x responses with an error case, unfortunately. ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [ ] Documentation updates if relevant. - [x] Tests if relevant.
fubuloubu
pushed a commit
to ApeWorX/iroh
that referenced
this pull request
Feb 21, 2024
## Description I did a a PR to merge the batch writer change. But it somehow got lost. n0-computer#2007 It was targeted to [fallible-store-traits](n0-computer#2005), which got merged to main. I would have expected github to retarget the PR to main, but apparently it did not do that. Maybe I made a mistake, not sure exactly. So here we go again. ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant.
rklaehn
added a commit
to n0-computer/iroh-blobs
that referenced
this pull request
Oct 22, 2024
## Description I did a a PR to merge the batch writer change. But it somehow got lost. n0-computer/iroh#2007 It was targeted to [fallible-store-traits](n0-computer/iroh#2005), which got merged to main. I would have expected github to retarget the PR to main, but apparently it did not do that. Maybe I made a mistake, not sure exactly. So here we go again. ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This makes the store traits fallible, which is a precondition for wiring up a store that uses IO for the blob index, such as the redb store.
There will be more changes to the traits, but this is necessary in any case and also a bit painful, so let's get it out of the way.
This also needs to extend the list-x responses with an error case, unfortunately.
Notes & open questions
Change checklist