Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

fix: Do not load all of a DAG into memory when pinning #2387

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

achingbrain
Copy link
Member

Port of #2372 into gc branch to ease merging

@achingbrain achingbrain requested review from alanshaw and dirkmc August 22, 2019 11:38
@achingbrain achingbrain mentioned this pull request Aug 22, 2019
11 tasks
Port of #2372 into gc branch to ease merging
@alanshaw alanshaw merged commit 27c128f into feat/gc Aug 23, 2019
@alanshaw alanshaw deleted the pinning-memory-fix branch August 23, 2019 09:24
@@ -51,30 +79,21 @@ class PinManager {
return Array.from(this.recursivePins, key => new CID(key).buffer)
}

getIndirectKeys (callback) {
getIndirectKeys ({ preload }, callback) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to preload when getting indirect keys?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As implemented we leave it up to the caller and it's an undocumented option that defaults to false.

In general I think we want to be really careful with preloading because you can end up inadvertently sending huge amounts of data over the wire, maxing out the number of allowed connections, etc.

alanshaw pushed a commit that referenced this pull request Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants