Conversation
will probably inline this once it is proven to work well
futures-buffered is reexported by n0-future, as I learned yesterday
...by reverting a change that I did because of some older version of clippy
Since we are guaranteed to be single threaded within the handler fns for a single hash, we can use a much more lightweight watcher impl. Also, tokio::sync::watch is optimized for the case where there are a lot of parallel watchers, using a giant BigNotify internally. We want to optimize for the case where there are just 0 or a few watchers, so we are not that much concerned with the thundering herd problem.
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-blobs/pr/101/docs/iroh_blobs/ Last updated: 2025-12-04T10:55:31Z |
4 tasks
rklaehn
commented
Jul 9, 2025
| _state: entity_manager::ActiveEntityState<Self>, | ||
| _cause: entity_manager::ShutdownCause, | ||
| ) { | ||
| async fn on_shutdown(state: HashContext, cause: ShutdownCause) { |
Collaborator
Author
|
Did a very superficial bench with the linux kernel. Doesn't seem to make perf worse, but also not better (not that I expected that...) |
…ut a buggy system
Still fails somehow.
This file contains hidden or 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
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
In the current blobs I am using tokio::sync::watch for notifying the observers when the state for a hash has changed. This works, but is way more heavy than needed.
Breaking Changes
None
Notes & open questions
Change checklist