add configuration for splitstore and default to a simple compaction algorithm

This commit is contained in:
vyzo
2021-03-05 14:46:17 +02:00
parent 2e4d45ef07
commit 73259aa350
4 changed files with 157 additions and 26 deletions
+7 -1
View File
@@ -103,7 +103,13 @@ func SplitBlockstore(cfg *config.Blockstore) func(lc fx.Lifecycle, r repo.Locked
return nil, err
}
ss, err := splitstore.NewSplitStore(path, ds, cold, hot, cfg.UseLMDBTracking)
ss, err := splitstore.NewSplitStore(path, ds, cold, hot,
&splitstore.Config{
UseLMDB: cfg.Splitstore.UseLMDBTracking,
EnableFullCompaction: cfg.Splitstore.EnableFullCompaction,
EnableGC: cfg.Splitstore.EnableGC,
Archival: cfg.Splitstore.Archival,
})
if err != nil {
return nil, err
}