Merge pull request #8034 from filecoin-project/feat/splitstore-default-markset-badger

splitstore: set badger as the default default markset type
This commit is contained in:
Łukasz Magiera 2022-02-07 19:27:13 +00:00 committed by GitHub
commit 966071d437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 9 deletions

View File

@ -49,10 +49,9 @@ These are options in the `[Chainstore.Splitstore]` section of the configuration:
blockstore and discards writes; this is necessary to support syncing from a snapshot. blockstore and discards writes; this is necessary to support syncing from a snapshot.
- `MarkSetType` -- specifies the type of markset to use during compaction. - `MarkSetType` -- specifies the type of markset to use during compaction.
The markset is the data structure used by compaction/gc to track live objects. The markset is the data structure used by compaction/gc to track live objects.
The default value is `"map"`, which will use an in-memory map; if you are limited The default value is "badger", which will use a disk backed markset using badger.
in memory (or indeed see compaction run out of memory), you can also specify If you have a lot of memory (40G or more) you can also use "map", which will use
`"badger"` which will use an disk backed markset, using badger. This will use an in memory markset, speeding up compaction at the cost of higher memory usage.
much less memory, but will also make compaction slower.
- `HotStoreMessageRetention` -- specifies how many finalities, beyond the 4 - `HotStoreMessageRetention` -- specifies how many finalities, beyond the 4
finalities maintained by default, to maintain messages and message receipts in the finalities maintained by default, to maintain messages and message receipts in the
hotstore. This is useful for assistive nodes that want to support syncing for other hotstore. This is useful for assistive nodes that want to support syncing for other

View File

@ -163,11 +163,11 @@
#HotStoreType = "badger" #HotStoreType = "badger"
# MarkSetType specifies the type of the markset. # MarkSetType specifies the type of the markset.
# It can be "map" (default) for in memory marking or "badger" for on-disk marking. # It can be "map" for in memory marking or "badger" (default) for on-disk marking.
# #
# type: string # type: string
# env var: LOTUS_CHAINSTORE_SPLITSTORE_MARKSETTYPE # env var: LOTUS_CHAINSTORE_SPLITSTORE_MARKSETTYPE
#MarkSetType = "map" #MarkSetType = "badger"
# HotStoreMessageRetention specifies the retention policy for messages, in finalities beyond # HotStoreMessageRetention specifies the retention policy for messages, in finalities beyond
# the compaction boundary; default is 0. # the compaction boundary; default is 0.

View File

@ -85,7 +85,7 @@ func DefaultFullNode() *FullNode {
Splitstore: Splitstore{ Splitstore: Splitstore{
ColdStoreType: "universal", ColdStoreType: "universal",
HotStoreType: "badger", HotStoreType: "badger",
MarkSetType: "map", MarkSetType: "badger",
HotStoreFullGCFrequency: 20, HotStoreFullGCFrequency: 20,
}, },

View File

@ -802,7 +802,7 @@ Only currently supported value is "badger".`,
Type: "string", Type: "string",
Comment: `MarkSetType specifies the type of the markset. Comment: `MarkSetType specifies the type of the markset.
It can be "map" (default) for in memory marking or "badger" for on-disk marking.`, It can be "map" for in memory marking or "badger" (default) for on-disk marking.`,
}, },
{ {
Name: "HotStoreMessageRetention", Name: "HotStoreMessageRetention",

View File

@ -359,7 +359,7 @@ type Splitstore struct {
// Only currently supported value is "badger". // Only currently supported value is "badger".
HotStoreType string HotStoreType string
// MarkSetType specifies the type of the markset. // MarkSetType specifies the type of the markset.
// It can be "map" (default) for in memory marking or "badger" for on-disk marking. // It can be "map" for in memory marking or "badger" (default) for on-disk marking.
MarkSetType string MarkSetType string
// HotStoreMessageRetention specifies the retention policy for messages, in finalities beyond // HotStoreMessageRetention specifies the retention policy for messages, in finalities beyond