use functional options for hotstore gc, rename MovingGC to FullGC
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ func DefaultFullNode() *FullNode {
|
||||
HotStoreType: "badger",
|
||||
MarkSetType: "map",
|
||||
|
||||
HotStoreMovingGCFrequency: 20,
|
||||
HotStoreFullGCFrequency: 20,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -291,10 +291,10 @@ type Splitstore struct {
|
||||
// HotStoreMessageRetention specifies the retention policy for messages, in finalities beyond
|
||||
// the compaction boundary; default is 0.
|
||||
HotStoreMessageRetention uint64
|
||||
// HotStoreMovingGCFrequency specifies how often to perform moving GC on the hotstore.
|
||||
// A value of 0 disables, while a value 1 will do moving GC in every compaction.
|
||||
// HotStoreFullGCFrequency specifies how often to perform a full (moving) GC on the hotstore.
|
||||
// A value of 0 disables, while a value 1 will do full GC in every compaction.
|
||||
// Default is 20 (about once a week).
|
||||
HotStoreMovingGCFrequency uint64
|
||||
HotStoreFullGCFrequency uint64
|
||||
}
|
||||
|
||||
// // Full Node
|
||||
|
||||
@@ -78,10 +78,10 @@ func SplitBlockstore(cfg *config.Chainstore) func(lc fx.Lifecycle, r repo.Locked
|
||||
}
|
||||
|
||||
cfg := &splitstore.Config{
|
||||
MarkSetType: cfg.Splitstore.MarkSetType,
|
||||
DiscardColdBlocks: cfg.Splitstore.ColdStoreType == "discard",
|
||||
HotStoreMessageRetention: cfg.Splitstore.HotStoreMessageRetention,
|
||||
HotStoreMovingGCFrequency: cfg.Splitstore.HotStoreMovingGCFrequency,
|
||||
MarkSetType: cfg.Splitstore.MarkSetType,
|
||||
DiscardColdBlocks: cfg.Splitstore.ColdStoreType == "discard",
|
||||
HotStoreMessageRetention: cfg.Splitstore.HotStoreMessageRetention,
|
||||
HotStoreFullGCFrequency: cfg.Splitstore.HotStoreFullGCFrequency,
|
||||
}
|
||||
ss, err := splitstore.Open(path, ds, hot, cold, cfg)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user