diff --git a/extern/storage-sealing/input.go b/extern/storage-sealing/input.go index d2b51edc984..b70bd809b09 100644 --- a/extern/storage-sealing/input.go +++ b/extern/storage-sealing/input.go @@ -473,6 +473,8 @@ func (m *Sealing) updateInput(ctx context.Context, sp abi.RegisteredSealProof) e return matches[i].sector.Number < matches[j].sector.Number // prefer older sectors }) + log.Debugw("updateInput matching", "matches", len(matches), "toAssign", len(toAssign), "openSectors", len(m.openSectors), "pieces", len(m.pendingPieces)) + var assigned int for _, mt := range matches { if m.pendingPieces[mt.deal].assigned { @@ -506,6 +508,8 @@ func (m *Sealing) updateInput(ctx context.Context, sp abi.RegisteredSealProof) e } } + log.Debugw("updateInput matching done", "matches", len(matches), "toAssign", len(toAssign), "assigned", assigned, "openSectors", len(m.openSectors), "pieces", len(m.pendingPieces)) + if len(toAssign) > 0 { log.Errorf("we are trying to create a new sector with open sectors %v", m.openSectors) if err := m.tryGetDealSector(ctx, sp, expF); err != nil { diff --git a/extern/storage-sealing/states_failed.go b/extern/storage-sealing/states_failed.go index 90fa5090a3a..dedba2fc6c6 100644 --- a/extern/storage-sealing/states_failed.go +++ b/extern/storage-sealing/states_failed.go @@ -184,14 +184,14 @@ func (m *Sealing) handleComputeProofFailed(ctx statemachine.Context, sector Sect } func (m *Sealing) handleSubmitReplicaUpdateFailed(ctx statemachine.Context, sector SectorInfo) error { + if err := failedCooldown(ctx, sector); err != nil { + return err + } + if sector.ReplicaUpdateMessage != nil { mw, err := m.Api.StateSearchMsg(ctx.Context(), *sector.ReplicaUpdateMessage) if err != nil { // API error - if err := failedCooldown(ctx, sector); err != nil { - return err - } - return ctx.Send(SectorRetrySubmitReplicaUpdateWait{}) } @@ -248,10 +248,6 @@ func (m *Sealing) handleSubmitReplicaUpdateFailed(ctx statemachine.Context, sect return ctx.Send(SectorAbortUpgrade{}) } - if err := failedCooldown(ctx, sector); err != nil { - return err - } - return ctx.Send(SectorRetrySubmitReplicaUpdate{}) }