Skip to content
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

Merged
merged 3 commits into from
Nov 29, 2019

Conversation

acud
Copy link
Member

@acud acud commented Nov 28, 2019

This PR tries to avoid multiple Sets 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.

@acud acud requested a review from janos November 28, 2019 07:23
@acud acud self-assigned this Nov 28, 2019
@acud acud added this to Backlog in Swarm Core - Sprint planning via automation Nov 28, 2019
@acud acud added this to the 0.5.4 milestone Nov 28, 2019
@acud acud moved this from Backlog to In review (includes Documentation) in Swarm Core - Sprint planning Nov 28, 2019
@acud acud requested a review from zelig November 28, 2019 14:56
@acud acud changed the title stream: avoid repeated SetSyncPull for chunk stream: avoid repeated SetSyncPull for chunk, change batch size Nov 29, 2019
@acud acud merged commit 7a2dfd5 into master Nov 29, 2019
Swarm Core - Sprint planning automation moved this from In review (includes Documentation) to Done Nov 29, 2019
@acud acud modified the milestones: 0.5.4, 0.5.5 Jan 21, 2020
@acud acud deleted the cache-sets branch January 22, 2020 04:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants