Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 01CF4200C2C for ; Fri, 3 Mar 2017 19:22:19 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0058B160B5E; Fri, 3 Mar 2017 18:22:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4B52A160B6D for ; Fri, 3 Mar 2017 19:22:18 +0100 (CET) Received: (qmail 90432 invoked by uid 500); 3 Mar 2017 18:22:17 -0000 Mailing-List: contact commits-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list commits@geode.apache.org Received: (qmail 90423 invoked by uid 99); 3 Mar 2017 18:22:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2017 18:22:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4E437DFC15; Fri, 3 Mar 2017 18:22:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kduling@apache.org To: commits@geode.apache.org Message-Id: <9ea4027071144db38e0e95462fe5be5d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: geode git commit: GEODE-2560: Missing disk files (.crf) during backup/restore throws exception Date: Fri, 3 Mar 2017 18:22:17 +0000 (UTC) archived-at: Fri, 03 Mar 2017 18:22:19 -0000 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 Authored: Wed Mar 1 09:49:18 2017 -0800 Committer: Kevin J. Duling 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); + } } }