mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
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. |
||
|---|---|---|
| .. | ||
| helpers | ||
| libp2p | ||
| bitswap.go | ||
| builder.go | ||
| core.go | ||
| dns.go | ||
| groups.go | ||
| helpers.go | ||
| identity.go | ||
| ipns.go | ||
| peering.go | ||
| provider.go | ||
| storage.go | ||