Skip to content

Commit

Permalink
don't count recent jobs in total sampled
Browse files Browse the repository at this point in the history
  • Loading branch information
walldiss committed Jun 7, 2023
1 parent a2685d4 commit 1021a91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion das/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ type WorkerStats struct {
func (s SamplingStats) totalSampled() uint64 {
var inProgress uint64
for _, w := range s.Workers {
inProgress += w.To - w.Curr + 1
// don't count recent jobs, since heights they are working on are after catchup head
if w.JobType != recentJob {
inProgress += w.To - w.Curr + 1
}
}
return s.CatchupHead - inProgress - uint64(len(s.Failed))
}
Expand Down

0 comments on commit 1021a91

Please sign in to comment.