protected Long seedBucketsWithHighestVersion(SolrIndexSearcher newSearcher,VersionInfo versions){
  Long highestVersion=null;
  final RTimer timer=new RTimer();
  try (RecentUpdates recentUpdates=getRecentUpdates()){
    long maxVersionFromRecent=recentUpdates.getMaxRecentVersion();
    long maxVersionFromIndex=versions.getMaxVersionFromIndex(newSearcher);
    long maxVersion=Math.max(maxVersionFromIndex,maxVersionFromRecent);
    if (maxVersion == 0L) {
      maxVersion=versions.getNewClock();
      log.info("Could not find max version in index or recent updates, using new clock {}",maxVersion);
    }
    versions.seedBucketsWithHighestVersion(maxVersion);
    highestVersion=maxVersion;
  }
 catch (  IOException ioExc) {
    log.warn("Failed to determine the max value of the version field due to: " + ioExc,ioExc);
  }
  log.debug("Took {}ms to seed version buckets with highest version {}",timer.getTime(),String.valueOf(highestVersion));
  return highestVersion;
}

protected Long seedBucketsWithHighestVersion ( SolrIndexSearcher newSearcher , VersionInfo versions ) { Long highestVersion = null ; final RTimer timer = new RTimer ( ) ; try ( RecentUpdates recentUpdates = getRecentUpdates ( ) ) { long maxVersionFromRecent = recentUpdates . getMaxRecentVersion ( ) ; long maxVersionFromIndex = versions . getMaxVersionFromIndex ( newSearcher ) ; long maxVersion = Math . max ( maxVersionFromIndex , maxVersionFromRecent ) ; if ( maxVersion == 0L ) { maxVersion = versions . getNewClock ( ) ; log . info ( "Could not find max version in index or recent updates, using new clock {}" , maxVersion ) ; } versions . seedBucketsWithHighestVersion ( maxVersion ) ; highestVersion = maxVersion ; } catch ( IOException ioExc ) { log . warn ( "Failed to determine the max value of the version field due to: " + ioExc , ioExc ) ; } log . debug ( "Took {}ms to seed version buckets with highest version {}" , timer . getTime ( ) , String . valueOf ( highestVersion ) ) ; return highestVersion ; }
used to seed all version buckets with the max value of the version field in the index .
