feat:chain:splitstore chain prune (#9056)
* Splitstore chain prune * Protect on reification for simpler logic and sound cold compact protect * Recovery from checkpoint during chain prune * Splitstore (discard and universal mode) running in itests * Add pause and restart functions to itest block miner * Add config options to itest full nodes * Add FsRepo support for itest full ndoes Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
This commit is contained in:
@@ -653,3 +653,14 @@ func (a *ChainAPI) ChainBlockstoreInfo(ctx context.Context) (map[string]interfac
|
||||
|
||||
return info.Info(), nil
|
||||
}
|
||||
|
||||
func (a *ChainAPI) ChainPrune(ctx context.Context, opts api.PruneOpts) error {
|
||||
pruner, ok := a.BaseBlockstore.(interface {
|
||||
PruneChain(opts api.PruneOpts) error
|
||||
})
|
||||
if !ok {
|
||||
return xerrors.Errorf("base blockstore does not support pruning (%T)", a.BaseBlockstore)
|
||||
}
|
||||
|
||||
return pruner.PruneChain(opts)
|
||||
}
|
||||
|
||||
@@ -271,7 +271,11 @@ func (lmem *lockedMemRepo) Blockstore(ctx context.Context, domain BlockstoreDoma
|
||||
}
|
||||
|
||||
func (lmem *lockedMemRepo) SplitstorePath() (string, error) {
|
||||
return ioutil.TempDir("", "splitstore.*")
|
||||
splitstorePath := filepath.Join(lmem.Path(), "splitstore")
|
||||
if err := os.MkdirAll(splitstorePath, 0755); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return splitstorePath, nil
|
||||
}
|
||||
|
||||
func (lmem *lockedMemRepo) ListDatastores(ns string) ([]int64, error) {
|
||||
|
||||
Reference in New Issue
Block a user