Skip to content

Commit

Permalink
fix(f3): handle a case where we might receive no manifest
Browse files Browse the repository at this point in the history
In _theory_ a lotus node can return no manifest from `F3Manifest`. I
don't think that happens in practice but we should handle the case and
start over at the top (try to get another lease). If we really have no
manifest, lotus will tell us that F3 isn't ready yet and we'll backoff
for a bit.
  • Loading branch information
Stebalien committed Oct 11, 2024
1 parent 876843a commit f6bf82b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion node/modules/storageminer.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,11 @@ func (p *f3Participator) awaitLeaseExpiry(ctx context.Context, lease api.F3Parti
}
log.Errorw("Failed to check F3 progress while awaiting lease expiry. Retrying after backoff.", "attempts", p.backoff.Attempt(), "backoff", p.backoff.Duration(), "err", err)
p.backOff(ctx)
case manifest.NetworkName != lease.Network:
case manifest == nil || manifest.NetworkName != lease.Network:
// If we got an unexpected manifest, or no manifest, go back to the
// beginning and try to get another ticket. Switching from having a manifest
// to having no manifest can theoretically happen if the lotus node reboots
// and has no static manifest.
return nil
}
switch progress, err := p.node.F3GetProgress(ctx); {
Expand Down

0 comments on commit f6bf82b

Please sign in to comment.