mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
feat(flatfs): default to sync=false (#10632)
Some checks are pending
CodeQL / codeql (push) Waiting to run
Docker Build / docker-build (push) Waiting to run
Gateway Conformance / gateway-conformance (push) Waiting to run
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Waiting to run
Go Build / go-build (push) Waiting to run
Go Check / go-check (push) Waiting to run
Go Lint / go-lint (push) Waiting to run
Go Test / go-test (push) Waiting to run
Interop / interop-prep (push) Waiting to run
Interop / helia-interop (push) Blocked by required conditions
Interop / ipfs-webui (push) Blocked by required conditions
Sharness / sharness-test (push) Waiting to run
Some checks are pending
CodeQL / codeql (push) Waiting to run
Docker Build / docker-build (push) Waiting to run
Gateway Conformance / gateway-conformance (push) Waiting to run
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Waiting to run
Go Build / go-build (push) Waiting to run
Go Check / go-check (push) Waiting to run
Go Lint / go-lint (push) Waiting to run
Go Test / go-test (push) Waiting to run
Interop / interop-prep (push) Waiting to run
Interop / helia-interop (push) Blocked by required conditions
Interop / ipfs-webui (push) Blocked by required conditions
Sharness / sharness-test (push) Waiting to run
This commit is contained in:
parent
4e91ea3220
commit
f2c190535c
@ -173,7 +173,7 @@ func flatfsSpec() map[string]interface{} {
|
||||
"child": map[string]interface{}{
|
||||
"type": "flatfs",
|
||||
"path": "blocks",
|
||||
"sync": true,
|
||||
"sync": false,
|
||||
"shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
|
||||
},
|
||||
},
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
- [🔦 Highlights](#-highlights)
|
||||
- [Bitswap improvements from Boxo](#bitswap-improvements-from-boxo)
|
||||
- [Using default `libp2p_rcmgr` metrics](#using-default-libp2p_rcmgr--metrics)
|
||||
- [Flatfs does not `sync` on each write](#flatfs-does-not-sync-on-each-write)
|
||||
- [`ipfs add --to-files` no longer works with `--wrap`](#ipfs-add---to-files-no-longer-works-with---wrap)
|
||||
- [New options for faster writes: `WriteThrough`, `BlockKeyCacheSize`, `BatchMaxNodes`, `BatchMaxSize`](#new-options-for-faster-writes-writethrough-blockkeycachesize-batchmaxnodes-batchmaxsize)
|
||||
- [MFS stability with large number of writes](#mfs-stability-with-large-number-of-writes)
|
||||
@ -29,6 +30,12 @@ Bespoke rcmgr metrics [were removed](https://github.com/ipfs/kubo/pull/9947), Ku
|
||||
This makes it easier to compare Kubo with custom implementations based on go-libp2p.
|
||||
If you depended on removed ones, please fill an issue to add them to the upstream [go-libp2p](https://github.com/libp2p/go-libp2p).
|
||||
|
||||
#### Flatfs does not `sync` on each write
|
||||
|
||||
New repositories initialized with `flatfs` in `Datastore.Spec` will have `sync` set to `false`.
|
||||
|
||||
The old default was overly conservative and caused performance issues in big repositories that did a lot of writes. There is usually no need to flush on every block write to disk before continuing. Setting this to false is safe as kubo will automatically flush writes to disk before and after performing critical operations like pinning. However, we still provide users with ability to set this to true to be extra-safe (at the cost of a slowdown when adding files in bulk).
|
||||
|
||||
#### `ipfs add --to-files` no longer works with `--wrap`
|
||||
|
||||
Onboarding files and directories with `ipfs add --to-files` now requires non-empty names. due to this, The `--to-files` and `--wrap` options are now mutually exclusive ([#10612](https://github.com/ipfs/kubo/issues/10612)).
|
||||
|
||||
@ -29,6 +29,8 @@ The shardFunc is prefixed with `/repo/flatfs/shard/v1` then followed by a descri
|
||||
}
|
||||
```
|
||||
|
||||
- `sync`: Flush every write to disk before continuing. Setting this to false is safe as kubo will automatically flush writes to disk before and after performing critical operations like pinning. However, you can set this to true to be extra-safe (at the cost of a slowdown when adding files).
|
||||
|
||||
NOTE: flatfs must only be used as a block store (mounted at `/blocks`) as it only partially implements the datastore interface. You can mount flatfs for /blocks only using the mount datastore (described below).
|
||||
|
||||
## levelds
|
||||
|
||||
Loading…
Reference in New Issue
Block a user