Skip to content

Commit

Permalink
Avoiding race condition in batching
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptowhizzard authored Feb 13, 2025
1 parent 646c67f commit 9de6669
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/seal/poller_commit_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ func (s *SealPoller) pollStartBatchCommitMsg(ctx context.Context, tasks []pollTa
cutoff := abi.ChainEpoch(0)
earliest := time.Now()
for _, pt := range pts[i:end] {

if pt.SectorNumber == 0 { // Assuming SectorNumber is always set for valid pollTask
log.Warnf("Skipping uninitialized pollTask in batch processing")
continue
}
if cutoff == 0 || pt.StartEpoch < cutoff {
cutoff = pt.StartEpoch
}
Expand Down

0 comments on commit 9de6669

Please sign in to comment.