Skip to content

Conversation

@guillaumemichel
Copy link
Contributor

@guillaumemichel guillaumemichel commented Aug 12, 2025

Companion PR to ipfs/kubo#10834

Warning

Don't merge before ipfs/kubo#10834 is ready to be merged, otherwise kubo compatibility will be broken


This builds on top of #976 to use the latest Provide interface as defined by the Reprovide Sweep.

It is necessary since Kubo will start using the new provide interface, and won't be able to satisfy the old provide interface required by boxo. Under the hoods, it is still possible to keep the same behavior as before this PR by using a wrapper around the old provider interface.

@codecov
Copy link

codecov bot commented Aug 12, 2025

Codecov Report

❌ Patch coverage is 15.90909% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.55%. Comparing base (1b799f0) to head (317bc43).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
mfs/dir.go 16.66% 6 Missing and 4 partials ⚠️
blockstore/blockstore.go 0.00% 6 Missing and 1 partial ⚠️
pinning/pinner/dspinner/pin.go 0.00% 6 Missing ⚠️
ipld/merkledag/merkledag.go 0.00% 5 Missing ⚠️
provider/provider.go 42.85% 3 Missing and 1 partial ⚠️
mfs/root.go 25.00% 3 Missing ⚠️
mfs/file.go 33.33% 1 Missing and 1 partial ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #995      +/-   ##
==========================================
- Coverage   60.60%   60.55%   -0.05%     
==========================================
  Files         268      268              
  Lines       33460    33446      -14     
==========================================
- Hits        20277    20254      -23     
- Misses      11513    11518       +5     
- Partials     1670     1674       +4     
Files with missing lines Coverage Δ
mfs/file.go 58.16% <33.33%> (ø)
mfs/root.go 30.68% <25.00%> (ø)
provider/provider.go 68.88% <42.85%> (+4.30%) ⬆️
ipld/merkledag/merkledag.go 73.35% <0.00%> (ø)
pinning/pinner/dspinner/pin.go 56.28% <0.00%> (ø)
blockstore/blockstore.go 51.31% <0.00%> (+0.39%) ⬆️
mfs/dir.go 51.83% <16.66%> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guillaumemichel guillaumemichel marked this pull request as ready for review September 5, 2025 12:12
@guillaumemichel guillaumemichel requested a review from a team as a code owner September 5, 2025 12:12
lidel and others added 3 commits September 8, 2025 22:39
changed log.Errorf to log.Debugf for providing debug message
clarifies when force=true vs force=false should be used for
rate limiting and caching strategies
@lidel lidel changed the title Reprovide Sweep interface refactor: use the new Reprovide Sweep interface Sep 9, 2025
@hsanjuan
Copy link
Contributor

hsanjuan commented Sep 9, 2025

Colo discussion:

  • Deal-breaker is that StartProviding() can be waiting for a lock for significant time while ResetCIDs() ongoing. StartProviding is called from everywhere that calls Provide() (blockstore, pinner, mfs, bitswap).
  • -> StartProviding should be made async() somehow

Discussion is how to make StartProvidingAsync():

  • A) Launch a goroutine
  • B) Put StartProviding CIDs in a queue
  • C) Switch to a datastore-backed queue
    • For all ResetCIds() + StartProviding CIds as they are coming in
  • Study necessary
    • Remember: The ResetCids() set should be updated with any new StartProviding() cids before it replaces the "old" set.

@guillaumemichel
Copy link
Contributor Author

Reverted all deadlock related changes and applied @gammazero suggestion (#995 (comment)) in 4684512

Copy link
Contributor

@gammazero gammazero left a comment

Choose a reason for hiding this comment

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

LGTM

@hsanjuan
Copy link
Contributor

Triage:

@guillaumemichel guillaumemichel merged commit 6fe835c into main Sep 18, 2025
16 checks passed
@guillaumemichel guillaumemichel deleted the reprovide-sweep branch September 18, 2025 15:07
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.

5 participants