Source:
<code>@Override @Nullable protected IgniteHistoricalIterator historicalIterator( CachePartitionPartialCountersMap partCntrs, Set<Integer> missing ) throws IgniteCheckedException { if (partCntrs == null || partCntrs.isEmpty()) return null; if (grp.mvccEnabled()) return super.historicalIterator(partCntrs, missing); GridCacheDatabaseSharedManager database = (GridCacheDatabaseSharedManager)grp.shared().database(); FileWALPointer latestReservedPointer = (FileWALPointer)database.latestWalPointerReservedForPreloading(); if (latestReservedPointer == null) { log.warning("Historical iterator wasn't created, because WAL isn't reserved."); <START> return null; <END> } Map<Integer, Long> partsCounters = new HashMap<>(); for (int i = 0; i < partCntrs.size(); i++) { int p = partCntrs.partitionAt(i); long initCntr = partCntrs.initialUpdateCounterAt(i); partsCounters.put(p, initCntr); } FileWALPointer minPtr = database.checkpointHistory().searchEarliestWalPointer(grp.groupId(), partsCounters, latestReservedPointer, grp.hasAtomicCaches() ? walAtomicCacheMargin : 0L); assert latestReservedPointer.compareTo(minPtr) <= 0 : "Historical iterator tries to iterate WAL out of reservation [cache=" + grp.cacheOrGroupName() + ", reservedPointer=" + database.latestWalPointerReservedForPreloading() + ", historicalPointer=" + minPtr + ']'; try { WALIterator it = grp.shared().wal().replay(minPtr); WALHistoricalIterator histIt = new WALHistoricalIterator(log, grp, partCntrs, partsCounters, it); missing.addAll(histIt.missingParts); return histIt; } catch (Exception ex) { if (!X.hasCause(ex, IgniteHistoricalIteratorException.class)) throw new IgniteHistoricalIteratorException(ex); throw ex; } }</code><technical_language>Should't throw IgniteHistoricalIteratorException fallback full rebalancing</technical_language>

Target:
@Override @Nullable protected IgniteHistoricalIterator historicalIterator( CachePartitionPartialCountersMap partCntrs, Set<Integer> missing ) throws IgniteCheckedException { if (partCntrs == null || partCntrs.isEmpty()) return null; if (grp.mvccEnabled()) return super.historicalIterator(partCntrs, missing); GridCacheDatabaseSharedManager database = (GridCacheDatabaseSharedManager)grp.shared().database(); FileWALPointer latestReservedPointer = (FileWALPointer)database.latestWalPointerReservedForPreloading(); if (latestReservedPointer == null) throw new IgniteHistoricalIteratorException("Historical iterator wasn't created, because WAL isn't reserved."); Map<Integer, Long> partsCounters = new HashMap<>(); for (int i = 0; i < partCntrs.size(); i++) { int p = partCntrs.partitionAt(i); long initCntr = partCntrs.initialUpdateCounterAt(i); partsCounters.put(p, initCntr); } FileWALPointer minPtr = database.checkpointHistory().searchEarliestWalPointer(grp.groupId(), partsCounters, latestReservedPointer, grp.hasAtomicCaches() ? walAtomicCacheMargin : 0L); assert latestReservedPointer.compareTo(minPtr) <= 0 : "Historical iterator tries to iterate WAL out of reservation [cache=" + grp.cacheOrGroupName() + ", reservedPointer=" + database.latestWalPointerReservedForPreloading() + ", historicalPointer=" + minPtr + ']'; try { WALIterator it = grp.shared().wal().replay(minPtr); WALHistoricalIterator histIt = new WALHistoricalIterator(log, grp, partCntrs, partsCounters, it); missing.addAll(histIt.missingParts); return histIt; } catch (Exception ex) { if (!X.hasCause(ex, IgniteHistoricalIteratorException.class)) throw new IgniteHistoricalIteratorException(ex); throw ex; } }