SingleSegmentLogicalRecordsIterator is broken - Fixes
@@ -47,9 +47,6 @@ public class SingleSegmentLogicalRecordsIterator extends AbstractWalRecordsItera
/** Segment initialized flag. */
private boolean segmentInitialized;
- /** Archived segment index. */
- private long archivedSegIdx;
-
/** Archive directory. */
private File archiveDir;
@@ -76,7 +73,7 @@ public class SingleSegmentLogicalRecordsIterator extends AbstractWalRecordsItera
) throws IgniteCheckedException {
super(log, sharedCtx, initLogicalRecordsSerializerFactory(sharedCtx), ioFactory, bufSize);
- this.archivedSegIdx = archivedSegIdx;
+ curWalSegmIdx = archivedSegIdx;
this.archiveDir = archiveDir;
this.advanceC = advanceC;
@@ -106,7 +103,7 @@ public class SingleSegmentLogicalRecordsIterator extends AbstractWalRecordsItera
segmentInitialized = true;
FileWriteAheadLogManager.FileDescriptor fd = new FileWriteAheadLogManager.FileDescriptor(
- new File(archiveDir, FileWriteAheadLogManager.FileDescriptor.fileName(archivedSegIdx)));
+ new File(archiveDir, FileWriteAheadLogManager.FileDescriptor.fileName(curWalSegmIdx)));
try {
return initReadHandle(fd, null);
