Search for next replication entry inside iteration context

Fixes ChronicleEnterprise/Chronicle-Map-Enterprise#69
This commit is contained in:
Ilya Kaznacheev
2021-08-30 14:26:30 +03:00
committed by Ilya Kaznacheev
parent a53c9aae58
commit 7029d3ab2f
@@ -919,12 +919,12 @@ public class ReplicatedChronicleMap<K, V, R> extends VanillaChronicleMap<K, V, R
throwExceptionIfClosed();
while (true) {
final long nextEntryPos = nextEntryPos(callback, chronicleId);
if (nextEntryPos == NOT_FOUND)
return false;
entryPos = nextEntryPos;
try (CompiledReplicatedMapIterationContext<K, V, R> context = iterationContext()) {
final long nextEntryPos = nextEntryPos(callback, chronicleId);
if (nextEntryPos == NOT_FOUND)
return false;
entryPos = nextEntryPos;
if (segmentIndex >= 0) {
// we are in first tiers (aka "segments")
context.initSegmentIndex(segmentIndex);