You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Reprovider.Strategy: rename "flat" to "all" (#10928)
* Reprovider strategy: rename "flat" to "all".
Value "flat" now parses to "all". Behaviour from "all" removed.
Fixes#10864 which has detailed explanation.
* core/node/provider.go: remove unused function mfsRootProvider
It was used in the "all" strategy.
* docs: improve reprovider.strategy=all changelog framing
- highlight memory efficiency improvements
- clarify this removes v0.28 workaround
- update config.md memory requirements
- fix announce-on profile typo
* feat: deprecate Reprovider.Strategy=flat
- add deprecation warning in daemon.go when flat strategy is detected
- document that flat is deprecated in ParseReproviderStrategy comment
- add explicit test case for flat -> all mapping
- flat continues to work but users are warned to migrate to all
---------
Co-authored-by: Marcin Rataj <[email protected]>
log.Error("Reprovider.Strategy='flat' is deprecated and will be removed in the next release. Please update your config to use 'all' instead.")
485
+
}
482
486
ifcfg.Experimental.StrategicProviding {
483
487
log.Error("Experimental.StrategicProviding was removed. Remove it from your config and set Provider.Enabled=false to remove this message. Documentation: https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#strategic-providing")
#### ⚙️ `Reprovider.Strategy` is now consistently respected
155
+
#### ⚙️ `Reprovider.Strategy` is now consistently respected.
155
156
156
157
Prior to this version, files added, blocks received etc. were "provided" to the network (announced on the DHT) regardless of the ["reproviding strategy" setting](https://github.com/ipfs/kubo/blob/master/docs/config.md#reproviderstrategy). For example:
157
158
@@ -165,6 +166,15 @@ This was inefficient as content that should not be provided was getting provided
165
166
> [!NOTE]
166
167
> **Behavior change:** The `--offline` flag no longer affects providing behavior. Both `ipfs add` and `ipfs --offline add` now provide blocks according to the reproviding strategy when run against an online daemon (previously `--offline add` did not provide). Since `ipfs add` has been nearly as fast as offline mode [since v0.35](https://github.com/ipfs/kubo/blob/master/docs/changelogs/v0.35.md#fast-ipfs-add-in-online-mode), `--offline` is rarely needed. To run truly offline operations, use `ipfs --offline daemon`.
The memory cost of `Reprovider.Strategy=all` no longer grows with the number of pins. The strategy now processes blocks directly from the datastore in undefined order, eliminating the memory pressure tied to the number of pins.
172
+
173
+
As part of this improvement, the `flat` reprovider strategy has been renamed to `all` (the default). This cleanup removes the workaround introduced in v0.28 for pin root prioritization. With the introduction of more granular strategies like [`pinned+mfs`](https://github.com/ipfs/kubo/blob/master/docs/config.md#reproviderstrategy), we can now optimize the default `all` strategy for lower memory usage without compromising users who need pin root prioritization ([rationale](https://github.com/ipfs/kubo/pull/10928#issuecomment-3211040182)).
174
+
175
+
> [!NOTE]
176
+
> **Migration guidance:** If you experience undesired announcement delays of root CIDs with the new `all` strategy, switch to `pinned+mfs` for root prioritization.
177
+
168
178
#### Removed unnecessary dependencies
169
179
170
180
Kubo has been cleaned up by removing unnecessary dependencies and packages:
Copy file name to clipboardExpand all lines: docs/config.md
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2063,7 +2063,6 @@ Type: `optionalDuration` (unset for the default)
2063
2063
Tells reprovider what should be announced. Valid strategies are:
2064
2064
2065
2065
-`"all"` - announce all CIDs of stored blocks
2066
-
- Order: root blocks of direct and recursive pins and MFS root are announced first, then the rest of blockstore
2067
2066
-`"pinned"` - only announce recursively pinned CIDs (`ipfs pin add -r`, both roots and child blocks)
2068
2067
- Order: root blocks of direct and recursive pins are announced first, then the child blocks of recursive pins
2069
2068
-`"roots"` - only announce the root block of explicitly pinned CIDs (`ipfs pin add`)
@@ -2079,15 +2078,13 @@ Tells reprovider what should be announced. Valid strategies are:
2079
2078
-`"pinned+mfs"` - a combination of the `pinned` and `mfs` strategies.
2080
2079
-**ℹ️ NOTE:** This is the suggested strategy for users who run without GC and don't want to provide everything in cache.
2081
2080
- Order: first `pinned` and then the locally available part of `mfs`.
2082
-
-`"flat"` - same as `all`, announce all CIDs of stored blocks, but without prioritizing anything.
2083
2081
2084
2082
**Strategy changes automatically clear the provide queue.** When you change `Reprovider.Strategy` and restart Kubo, the provide queue is automatically cleared to ensure only content matching your new strategy is announced. You can also manually clear the queue using `ipfs provide clear`.
2085
2083
2086
2084
**Memory requirements:**
2087
2085
2088
-
- Reproviding larger pinsets using the `all`, `mfs`, `pinned`, `pinned+mfs` or `roots` strategies requires additional memory, with an estimated ~1 GiB of RAM per 20 million items for reproviding to the Amino DHT.
2086
+
- Reproviding larger pinsets using the `mfs`, `pinned`, `pinned+mfs` or `roots` strategies requires additional memory, with an estimated ~1 GiB of RAM per 20 million items for reproviding to the Amino DHT.
2089
2087
- This is due to the use of a buffered provider, which avoids holding a lock on the entire pinset during the reprovide cycle.
2090
-
- The `flat` strategy can be used to lower memory requirements, but only recommended if memory utilization is too high, prioritization of pins is not necessary, and it is acceptable to announce every block cached in the local repository.
2091
2088
2092
2089
Default: `"all"`
2093
2090
@@ -3446,7 +3443,7 @@ Disables [Reprovider](#reprovider) system (and announcing to Amino DHT).
3446
3443
3447
3444
### `announce-on` profile
3448
3445
3449
-
(Re-)enables [Reprovider](#reprovider) system (reverts [`announce-off` profile](#annouce-off-profile).
3446
+
(Re-)enables [Reprovider](#reprovider) system (reverts [`announce-off` profile](#announce-off-profile)).
0 commit comments