Skip to content

Merge release v0.34.0#10759

Merged
lidel merged 15 commits intomasterfrom
merge-release-v0.34.0
Mar 20, 2025
Merged

Merge release v0.34.0#10759
lidel merged 15 commits intomasterfrom
merge-release-v0.34.0

Conversation

@lidel
Copy link
Member

@lidel lidel commented Mar 20, 2025

cc #10685

lidel and others added 14 commits March 5, 2025 23:22
Fixes #10596.

The reproviding process can take long. Currently, each CID to be provided is
obtained by making a query to the pinner and reading one by one as the CIDs
get provided.

While this query is ongoing, the pinner holds a Read mutex on the pinset.

If a pin-add-request arrives, a goroutine will start waiting for a Write mutex
on the pinset. From that point, no new Read mutexes can be taken until the writer
can proceed and finishes.

However, no one can proceed because the read mutex is still held while the
reproviding is ongoing.

The fix is mostly in Boxo, where we add a "buffered" provider which reads the
cids onto memory so that they can be provided at its own pace without making
everyone wait.

The consequence is we will need more RAM memory. Rule of thumb is 1GiB extra per 20M cids to be reprovided.

(cherry picked from commit ba22102)
(cherry picked from commit 9de9384)
* fix typos
* fix func name in docstring
* use t.TempDir instead of os.MkdirTemp
* fix typo
* unique option names

(cherry picked from commit 095cc0d)
* Upgrade to Boxo v0.29.1

(cherry picked from commit 183dc7d)
* docs(readme): update min. requirements + cleanup

Adding note about extra memory requirement due to
ba22102

* docs(config): memory cost of buffered provider

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
(cherry picked from commit 96f3007)
@lidel lidel requested a review from a team as a code owner March 20, 2025 22:07
@lidel lidel merged commit b339490 into master Mar 20, 2025
2 checks passed
@lidel lidel deleted the merge-release-v0.34.0 branch March 20, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments