}
private FeederSyncupReader setupReader(VLSN startVLSN)
throws DatabaseException, IOException {
EnvironmentImpl envImpl = repNode.getRepImpl();
int readBufferSize = envImpl.getConfigManager().
getInt(EnvironmentParams.LOG_ITERATOR_READ_SIZE);
/*
* A BackwardsReader for scanning the log file backwards. It must not
* go past the global CBVLSN, because the log cleaner is allowed to
* delete anything < the global CBVLSN, even during syncup.
*/
long lastUsedLsn = envImpl.getFileManager().getLastUsedLsn();
long finishLsn = DbLsn.makeLsn(repNode.getCleanerBarrierFile(), 0);
return new FeederSyncupReader(envImpl,
vlsnIndex,
lastUsedLsn,
readBufferSize,