You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2017/03/07 19:22:12 UTC
[49/51] [abbrv] geode git commit: GEODE-2560: Missing disk files
(.crf) during backup/restore throws exception
GEODE-2560: Missing disk files (.crf) during backup/restore throws exception
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/21a9b5e2
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/21a9b5e2
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/21a9b5e2
Branch: refs/heads/feature/GEM-1195
Commit: 21a9b5e2c60ddc909ebc28ebfa3b6aeb33b6ee12
Parents: c0633c8
Author: Kevin J. Duling <kd...@pivotal.io>
Authored: Wed Mar 1 09:49:18 2017 -0800
Committer: Kevin J. Duling <kd...@pivotal.io>
Committed: Fri Mar 3 10:21:17 2017 -0800
----------------------------------------------------------------------
.../main/java/org/apache/geode/internal/cache/Oplog.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/21a9b5e2/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java b/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
index f5aec51..8b0bba5 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
@@ -5804,14 +5804,18 @@ public final class Oplog implements CompactableOplog, Flushable {
}
public void copyTo(File targetDir) throws IOException {
- if (this.crf.f != null) { // fixes bug 43951
+ if (this.crf.f != null && this.crf.f.exists()) {
FileUtils.copyFileToDirectory(this.crf.f, targetDir);
}
- FileUtils.copyFileToDirectory(this.drf.f, targetDir);
+ if (this.drf.f.exists()) {
+ FileUtils.copyFileToDirectory(this.drf.f, targetDir);
+ }
// this krf existence check fixes 45089
if (getParent().getDiskInitFile().hasKrf(this.oplogId)) {
- FileUtils.copyFileToDirectory(this.getKrfFile(), targetDir);
+ if (this.getKrfFile().exists()) {
+ FileUtils.copyFileToDirectory(this.getKrfFile(), targetDir);
+ }
}
}