GEODE-2816: Redundancy recovery inititated even if redundancy set to 0

Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/c1a69140
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/c1a69140
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/c1a69140

Branch: refs/heads/feature/GEM-1299
Commit: c1a69140792b1d23ab9c467bb54c746550368b60
Parents: 668f8f4
Author: nabarun <[email protected]>
Authored: Mon Apr 24 10:50:06 2017 -0700
Committer: zhouxh <[email protected]>
Committed: Wed Apr 26 23:28:50 2017 -0700

----------------------------------------------------------------------
 .../org/apache/geode/internal/cache/PRHARedundancyProvider.java | 2 +-
 .../java/org/apache/geode/internal/cache/PartitionedRegion.java | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/c1a69140/geode-core/src/main/java/org/apache/geode/internal/cache/PRHARedundancyProvider.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PRHARedundancyProvider.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PRHARedundancyProvider.java
index d2f44e8..6fc4ba0 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PRHARedundancyProvider.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PRHARedundancyProvider.java
@@ -1537,7 +1537,7 @@ public class PRHARedundancyProvider {
       delay = this.prRegion.getPartitionAttributes().getRecoveryDelay();
       movePrimaries = false;
     }
-    final boolean requiresRedundancyRecovery = delay >= 0 && redundantCopies > 
0;
+    final boolean requiresRedundancyRecovery = delay >= 0;
 
     if (!requiresRedundancyRecovery) {
       return;

http://git-wip-us.apache.org/repos/asf/geode/blob/c1a69140/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index e15eb2a..e0aae5d 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -958,10 +958,7 @@ public class PartitionedRegion extends LocalRegion
     try {
       if (storesData) {
         this.redundancyProvider.scheduleCreateMissingBuckets();
-
-        if (this.redundantCopies > 0) {
-          this.redundancyProvider.startRedundancyRecovery();
-        }
+        this.redundancyProvider.startRedundancyRecovery();
       }
     } catch (RegionDestroyedException rde) {
       // Do nothing.

Reply via email to