v1.27.0-a #10

Closed
jonathanface wants to merge 473 commits from v1.27.0-a into master
2 changed files with 13 additions and 1 deletions
Showing only changes of commit 277cbf9229 - Show all commits

View File

@ -182,8 +182,16 @@ func (sm *StateManager) HandleStateForks(ctx context.Context, root cid.Cid, heig
if err == nil { if err == nil {
if ok { if ok {
log.Infow("CACHED migration", "height", height, "from", root, "to", migCid) log.Infow("CACHED migration", "height", height, "from", root, "to", migCid)
foundMigratedRoot, err := sm.ChainStore().StateBlockstore().Has(ctx, migCid)
if err != nil {
log.Errorw("failed to check whether previous migration result is present", "err", err)
} else if !foundMigratedRoot {
log.Errorw("cached migration result not found in blockstore, running migration again")
u.migrationResultCache.Delete(ctx, root)
} else {
return migCid, nil return migCid, nil
} }
}
} else if !errors.Is(err, datastore.ErrNotFound) { } else if !errors.Is(err, datastore.ErrNotFound) {
log.Errorw("failed to lookup previous migration result", "err", err) log.Errorw("failed to lookup previous migration result", "err", err)
} else { } else {

View File

@ -113,6 +113,10 @@ func (m *migrationResultCache) Store(ctx context.Context, root cid.Cid, resultCi
return nil return nil
} }
func (m *migrationResultCache) Delete(ctx context.Context, root cid.Cid) {
_ = m.ds.Delete(ctx, m.keyForMigration(root))
}
type Executor interface { type Executor interface {
NewActorRegistry() *vm.ActorRegistry NewActorRegistry() *vm.ActorRegistry
ExecuteTipSet(ctx context.Context, sm *StateManager, ts *types.TipSet, em ExecMonitor, vmTracing bool) (stateroot cid.Cid, rectsroot cid.Cid, err error) ExecuteTipSet(ctx context.Context, sm *StateManager, ts *types.TipSet, em ExecMonitor, vmTracing bool) (stateroot cid.Cid, rectsroot cid.Cid, err error)