This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
stream: avoid repeated SetSyncPull for chunk, change batch size #1993
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.
This PR tries to avoid multiple
Set
s of a chunk as Synced using an LRU cache.Every time a node receives a chunk by syncing it will try to sync that chunk out again (for replication sake and in order to maintain integrity of bin IDs).
This is turn means that the node that sent the chunk to the node will be presented with an
OfferedHashes
message that contains chunks that this node already has and has already synced to other nodes. The number of such duplicate sets can potentially be very high and using an LRU cache for these sets can ease some of the load we're seeing on the localstore as a result.