diff --git a/migration/runner.go b/migration/runner.go index 43e12bed..7c4c78ff 100644 --- a/migration/runner.go +++ b/migration/runner.go @@ -2,6 +2,7 @@ package migration import ( "context" + "errors" "sync" "sync/atomic" "time" @@ -86,7 +87,7 @@ func RunMigration(ctx context.Context, cfg Config, cache MigrationCache, store c for job := range jobCh { result, err := job.run(ctx, store) if err != nil { - if err == errMigrationDeferred { + if errors.Is(err, errMigrationDeferred) { atomic.AddUint32(&doneCount, 1) continue } diff --git a/migration/util.go b/migration/util.go index 17ccafd6..29db9b11 100644 --- a/migration/util.go +++ b/migration/util.go @@ -2,6 +2,7 @@ package migration import ( "context" + "errors" "sync" "time" @@ -232,7 +233,7 @@ func (d DeferredMigrator) MigratedCodeCID() cid.Cid { panic("this can't be called") } -var errMigrationDeferred = xerrors.Errorf("migration deferred") +var errMigrationDeferred = errors.New("migration deferred") func (d DeferredMigrator) MigrateState(ctx context.Context, store cbor.IpldStore, in ActorMigrationInput) (*ActorMigrationResult, error) { d.ds.lk.Lock()