IGNITE-8561 SingleSegmentLogicalRecordsIterator is broken - Fixes #4045. Signed-off-by: Ivan Rakov <ira...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/21678bcc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/21678bcc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/21678bcc Branch: refs/heads/ignite-5789-1 Commit: 21678bcc4c10a62d796ce580ffd7684012335535 Parents: 2cad0ab Author: Anton Kalashnikov <kaa....@yandex.ru> Authored: Wed May 23 12:24:51 2018 +0300 Committer: Ivan Rakov <ira...@apache.org> Committed: Wed May 23 12:24:51 2018 +0300 ---------------------------------------------------------------------- .../persistence/wal/SingleSegmentLogicalRecordsIterator.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/21678bcc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/SingleSegmentLogicalRecordsIterator.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/SingleSegmentLogicalRecordsIterator.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/SingleSegmentLogicalRecordsIterator.java index d5c10cf..36e5b0e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/SingleSegmentLogicalRecordsIterator.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/SingleSegmentLogicalRecordsIterator.java @@ -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);