You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/02/20 08:50:38 UTC
ignite git commit: IGNITE-7747 Exception should not be throw if
segments not found for getAndReserveWalFiles. Stopped iteration if next
segment not found - Fixes #3539.
Repository: ignite
Updated Branches:
refs/heads/master a125b0d84 -> b0359c74a
IGNITE-7747 Exception should not be throw if segments not found for getAndReserveWalFiles. Stopped iteration if next segment not found - Fixes #3539.
Signed-off-by: Alexey Goncharuk <al...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b0359c74
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b0359c74
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b0359c74
Branch: refs/heads/master
Commit: b0359c74a0dfd156e7608452ba5549c2777f3e79
Parents: a125b0d
Author: Dmitriy Govorukhin <dm...@gmail.com>
Authored: Tue Feb 20 11:49:45 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Feb 20 11:49:45 2018 +0300
----------------------------------------------------------------------
.../wal/FileWriteAheadLogManager.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b0359c74/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
index cc764fd..2b20afc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java
@@ -432,7 +432,10 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
}
/**
+ * Collect wal segment files from low pointer (include) to high pointer (not include) and reserve low pointer.
*
+ * @param low Low bound.
+ * @param high High bound.
*/
public Collection<File> getAndReserveWalFiles(FileWALPointer low, FileWALPointer high) throws IgniteCheckedException {
final long awaitIdx = high.index() - 1;
@@ -448,13 +451,19 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
String segmentName = FileDescriptor.fileName(i);
File file = new File(walArchiveDir, segmentName);
+ File fileZip = new File(walArchiveDir, segmentName + ".zip");
- if (file.exists())
+ if (file.exists() || fileZip.exists())
res.add(file);
- else if ((file = new File(walArchiveDir, segmentName + ".zip")).exists())
- res.add(file);
- else
- throw new IgniteCheckedException("WAL archive segment has been deleted [idx=" + i + "]");
+ else {
+ if (log.isInfoEnabled()){
+ log.info("Segment not found: " + file.getName() + "/" + fileZip.getName());
+
+ log.info("Stopped iteration on idx: " + i);
+ }
+
+ break;
+ }
}
return res;