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

refactor(iroh-bytes): Async bao store #2043

Merged
merged 2 commits into from
Feb 26, 2024
Merged

refactor(iroh-bytes): Async bao store #2043

merged 2 commits into from
Feb 26, 2024

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Feb 26, 2024

Description

Asyncify bao store traits

Asyncify almost the complete surface area of the bao store traits, to make an actor based implementation that lives on its own std::thread::Thread at least theoretically possible.

Notes & open questions

Note: There is a sync method fn entry_status_sync so we don't have to rewrite the document sync algorithm. It should be replaced asap since it will be not very efficient.

Note2: there is 1 unrelated change: get_or_create_partial is renamed to just get_or_create, since you have no control over whether the created entry is partial. If the entry is already complete, what do you do? You return a complete entry.

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.

@rklaehn rklaehn changed the title Async bao store refactor(iroh-bytes): Async bao store Feb 26, 2024
@rklaehn rklaehn added this pull request to the merge queue Feb 26, 2024
Merged via the queue into main with commit 5398479 Feb 26, 2024
20 of 21 checks passed
@dignifiedquire dignifiedquire deleted the async-bao-store branch February 26, 2024 18:40
fubuloubu pushed a commit to ApeWorX/iroh that referenced this pull request Feb 27, 2024
## Description

Asyncify bao store traits

Asyncify almost the complete surface area of the bao store traits, to
make an actor based implementation that lives on its own
std::thread::Thread at least theoretically possible.

## Notes & open questions

Note: There is a sync method `fn entry_status_sync` so we don't have to
rewrite the document sync algorithm. It should be replaced asap since it
will be not very efficient.

Note2: there is 1 unrelated change: get_or_create_partial is renamed to
just get_or_create, since you have no control over whether the created
entry is partial. If the entry is already complete, what do you do? You
return a complete entry.

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates if relevant.
- [ ] Tests if relevant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants