This repository was archived by the owner on Feb 12, 2024. It is now read-only.
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.
Implement Garbage Collection #2022
Implement Garbage Collection #2022
Changes from all commits
eb4ab1f
761e305
2f632ec
7b498fb
c8e964a
0137caf
f6d7a2a
793a355
719a9f9
a5db723
ae27eb5
1e3aedc
df86ce4
0d5085d
43b1720
d970a32
3ec57d9
255dee3
c8d1f08
568a1d9
c0007af
8de0c2b
28b615d
05ae894
8b52444
0c7cfdf
81e3dd0
7898ca2
bdcbddb
a07ed7f
ef86efc
75159a0
c2b5ef6
7cfc53b
026158f
bf4e731
356e263
58f34d6
168046a
216e53a
4712178
681b577
c81a920
11a02dd
1e4c97a
a8c362c
43a2644
c992c51
c364b19
358b957
bcc8a69
24c072e
97f8054
36f45f4
d085a30
f869455
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might have missed the explanation, can someone link me to it or explain here why does GC need another lock on top of the Repo lock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GC lock is used to prevent blocks being added/removed from the blockstore while GC is running. My understanding is that the Repo lock is used to prevent multiple instances of js-ipfs-repo from opening the same path, is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying.
Now wondering.. what happens to all inflight blocks coming in Bitswap? Is there a test to see if js-ipfs OOMs when performing a GC and someone sends a ton of blocks through bitswap that get queued in memory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question - in general that's the problem with stop-the-world GC, it blocks everything up while GC is being performed.