be more conservative in increasing the window size, check that we actually had more messages
This commit is contained in:
parent
3935fd77ac
commit
63a60cdd75
@ -1485,12 +1485,13 @@ mainLoop:
|
|||||||
return xerrors.Errorf("message processing failed: %w", err)
|
return xerrors.Errorf("message processing failed: %w", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i -= batchSize
|
|
||||||
|
|
||||||
if i >= 0 {
|
if i >= windowSize {
|
||||||
windowSize += 10
|
windowSize += 10
|
||||||
log.Infof("successfully fetched %d messages; increasing window size to %d", len(bstout), windowSize)
|
log.Infof("successfully fetched %d messages; increasing window size to %d", len(bstout), windowSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i -= batchSize
|
||||||
}
|
}
|
||||||
|
|
||||||
// remember our window size
|
// remember our window size
|
||||||
|
Loading…
Reference in New Issue
Block a user