* ensure that the next readAheadCount messages are always available.
*
* @return the range scan that should be issued for read ahead
*/
protected RangeScanRequest doReadAhead(ScanRequest request) {
ByteString topic = request.getTopic();
Long seqId = request.getStartSeqId();
int readAheadCount = cfg.getReadAheadCount();
// To prevent us from getting screwed by bad configuration
readAheadCount = Math.max(1, readAheadCount);