Fix off by one error

This commit is contained in:
David Boreham 2022-09-21 13:06:41 -06:00
parent 6d103cb1f1
commit b1440d9673

View File

@ -124,7 +124,7 @@ func (sds *Service) Run(rngs []RangeRequest, parallel bool) error {
// Chunk overall range into N subranges for workers
chunkSize := (preRun.Stop - preRun.Start) / uint64(sds.workers)
logrus.Infof("parallel processing prerun range (%d, %d) (%d blocks) divided into %d sized chunks with %d workers", preRun.Start, preRun.Stop,
preRun.Stop-preRun.Start, chunkSize, sds.workers)
preRun.Stop-preRun.Start+1, chunkSize, sds.workers)
// Sanity floor the chunk size
if chunkSize < 100 {
chunkSize = 100