geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kdul...@apache.org
Subject geode git commit: GEODE-2560: Missing disk files (.crf) during backup/restore throws exception
Date Fri, 03 Mar 2017 18:22:17 GMT
Repository: geode
Updated Branches:
  refs/heads/develop c0633c8d6 -> 21a9b5e2c


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/develop
Commit: 21a9b5e2c60ddc909ebc28ebfa3b6aeb33b6ee12
Parents: c0633c8
Author: Kevin J. Duling <kduling@pivotal.io>
Authored: Wed Mar 1 09:49:18 2017 -0800
Committer: Kevin J. Duling <kduling@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);
+      }
     }
   }
 


Mime
View raw message