Skip to content

fix: check provide strategy before providing newly added filestore blocks#11243

Open
HarukaMa wants to merge 5 commits intoipfs:masterfrom
HarukaMa:fix/filestore/provide-strategy-gate
Open

fix: check provide strategy before providing newly added filestore blocks#11243
HarukaMa wants to merge 5 commits intoipfs:masterfrom
HarukaMa:fix/filestore/provide-strategy-gate

Conversation

@HarukaMa
Copy link
Copy Markdown

@HarukaMa HarukaMa commented Mar 18, 2026

currently, all blocks added into filestore is provided regardless of which provide strategy is selected, which makes little sense when the current strategy is not "all" (new files might not be pinned with --pin=false or might not be added to MFS). Added a similar check as the blockstore to make the behavior identical between blockstore and filestore.

I'm personally using "roots" strategy with a custom script to only keep direct pins to the individual files and directories, so I don't provide every raw file block to the network to save some resources. I discovered that kubo was trying to provide all blocks nonetheless. Tested the new code by adding some new files to the filestore and there are no unwanted provides now.

@HarukaMa HarukaMa requested a review from a team as a code owner March 18, 2026 23:30
@HarukaMa HarukaMa force-pushed the fix/filestore/provide-strategy-gate branch from 2571283 to 80ff414 Compare March 18, 2026 23:40
…ocks

currently, all blocks added into filestore is provided regardless of which provide strategy is selected, which makes little sense when the current strategy is not "all" (new files might not be pinned with --pin=false or might not be added to MFS). Added a similar check as the blockstore to make the behavior identical between blockstore and filestore.
@HarukaMa HarukaMa force-pushed the fix/filestore/provide-strategy-gate branch from 80ff414 to 1d77c6f Compare March 18, 2026 23:42
lidel added 2 commits March 22, 2026 22:05
- reword heading and description for clarity
- link to filestore and urlstore experiment docs
- mention both experiments since both use the same code path
@lidel lidel force-pushed the fix/filestore/provide-strategy-gate branch from 6da66f0 to 9d95603 Compare March 22, 2026 22:18
@lidel lidel self-assigned this Mar 22, 2026
@lidel lidel force-pushed the fix/filestore/provide-strategy-gate branch 3 times, most recently from 3a4f379 to 1377009 Compare March 23, 2026 03:49
- add positive/negative test pair for filestore provide gating
- positive: filestore + "all" strategy provides root and leaf CIDs
- negative: filestore + "roots" strategy with --pin=false does not
- increase providerTimeout to 30s for CI reliability
- replace fixed 500ms DHT sleep with waitForProviderReady: polls
  'ipfs provide stat' for SweepingProvider connectivity, then runs
  a canary provide+findprovs round-trip
- add expectNoneProvided for parallel negative assertions to avoid
  sequential timeout accumulation
@lidel lidel force-pushed the fix/filestore/provide-strategy-gate branch from 1377009 to 1b22bf6 Compare March 23, 2026 04:15
…de-strategy-gate

# Conflicts:
#	docs/changelogs/v0.41.md
Copy link
Copy Markdown
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thank you @HarukaMa! lgtm, but needs tests.

I've pushed some here, but realized the tests we had were not very reliable. Reworking them in #11245. Once ready I will either backpor here, or merge after that.

I will figure out if this lands before or after #11245 lands, and merge accordingly.

@lidel lidel mentioned this pull request Mar 28, 2026
25 tasks
@lidel lidel added the status/blocked Unable to be worked further until needs are met label Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/blocked Unable to be worked further until needs are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants