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)!: remove flume dependency #2622

Merged
merged 9 commits into from
Aug 14, 2024
Merged

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Aug 13, 2024

Description

This is mostly a pretty mechanical replacement of flume with async_channel in the rebd blob store.

One not so tiny change is that to support closing a read or write transaction after some delay, and because async_channel does not have recv_timeout, we switch the entire actor loop to run async but on a dedicated thread of the main runtime.

That way we can use tokio::select! {..., timeout}

Breaking Changes

FlumeProgressSender was removed

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@rklaehn rklaehn changed the title refactor(iroh-bytes): remove flume dependency refactor(iroh-bytes)!: remove flume dependency Aug 13, 2024
Copy link

github-actions bot commented Aug 13, 2024

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

Last updated: 2024-08-14T07:58:04Z

@rklaehn rklaehn requested a review from Frando August 13, 2024 16:10
@rklaehn
Copy link
Contributor Author

rklaehn commented Aug 14, 2024

@Frando this is similar to what you did with the docs store, I guess. The only difference is that I am using the main runtime to block on so you get the main blocking pool when calling spawn_blocking instead of the (single?) io thread of a single threaded runtime...

@rklaehn rklaehn marked this pull request as ready for review August 14, 2024 14:46
@rklaehn rklaehn added this pull request to the merge queue Aug 14, 2024
Merged via the queue into main with commit e9c5088 Aug 14, 2024
27 of 28 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Sep 2, 2024
…#2688)

## Description

This fixes a small copy and paste bug that was introduced in #2622,
here:
https://github.com/n0-computer/iroh/pull/2622/files?diff=unified&w=0#diff-bbe46ca272a808bb1c94619ab3264586a47a6ec6e0f7cd5a63dba5e99099241bL1521-R1526
(You need to load the diff for the `fs.rs` file)
<!-- A summary of what this pull request achieves and a rough list of
changes. -->

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
None

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->
Tests would be nice, but I'm looking at other things right now, so I'd
prefer to merge this first :S

## Change checklist

- [x] Self-review.
- ~~[ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.~~
- ~~[ ] Tests if relevant.~~
- [x] All breaking changes documented.
matheus23 pushed a commit that referenced this pull request Nov 14, 2024
## Description

This is mostly a pretty mechanical replacement of flume with
async_channel in the rebd blob store.

One not so tiny change is that to support closing a read or write
transaction after some delay, and because async_channel does not have
recv_timeout, we switch the entire actor loop to run *async* but on a
dedicated thread of the main runtime.

That way we can use `tokio::select! {..., timeout}`

## Breaking Changes

FlumeProgressSender was removed

## Notes & open questions

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
@rklaehn rklaehn deleted the flume-purge-bytes branch November 20, 2024 12:31
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