-
Notifications
You must be signed in to change notification settings - Fork 49
feat: incorporate sds-r into reliable channels #2701
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
Open
jm-clius
wants to merge
10
commits into
master
Choose a base branch
from
feat/sds-r-in-reliable-channels
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
size-limit report 📦
|
90fddd2 to
3ba50d4
Compare
3ba50d4 to
9d82564
Compare
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.
Add SDS-R into reliable channels as optional parallel or singular strategy for recovery.
There are three main design choices that need review here:
SDS-R by default functions as a parallel mechanism to store retrieval: there is no lockstep mechanism where the one retrieval strategy serves as fallback if the other fails. This seems to me the most natural way of integrating SDS-R, after some consideration. In general, a reliable channels instance will attempt store retrieval after detecting a missed dependency without delay. SDS-R will kick in with some delay (generally min 30s). If by that point the missing dependency has been received (via relay or via Store retrieval), the pending repair will be removed from the buffer and never enter an SDS-R exchange. There is however a possible race condition that can cause a missing dependency to be requested (and retrieved) from a Store node and via SDS-R. This is not optimal, but I think a reasonable tradeoff for simplicity.
Store retrieval can now be disabled completely, adding some configuration complexity i.t.o.
retrievalStrategy("store only", "sds-r only", "both", "none"). I'm not quite convinced this level of configurability is necessary, but there seems to be some use cases for a store-less reliable channel based on recent Discord discussions.SDS-R works better if the sync period is shorter, so I've added a simple adaptive strategy that triggers Sync more often if there are pending repair requests. This has an impact on bandwidth and message rates.