geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [6/9] geode git commit: GEODE-3049: Fix closeBucket() logic
Date Tue, 18 Jul 2017 18:26:55 GMT
GEODE-3049: Fix closeBucket() logic

  * need to check if redundancy ever satisfied and/or if any copies
  * ever present before decrementing statistics counts


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

Branch: refs/heads/feature/GEODE-3049
Commit: c786b4ef81dde10e567538cc6ee53e6544d9b271
Parents: d53bf02
Author: Nick Reich <nreich@pivotal.io>
Authored: Mon Jun 26 16:20:08 2017 -0700
Committer: Nick Reich <nreich@pivotal.io>
Committed: Mon Jun 26 16:20:08 2017 -0700

----------------------------------------------------------------------
 .../org/apache/geode/internal/cache/BucketRedundancyTracker.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/c786b4ef/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRedundancyTracker.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRedundancyTracker.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRedundancyTracker.java
index 09c132e..8525f13 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRedundancyTracker.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRedundancyTracker.java
@@ -45,11 +45,11 @@ class BucketRedundancyTracker {
    * Adjust statistics based on closing a bucket
    */
   synchronized void closeBucket() {
-    if (!redundancySatisfied) {
+    if (redundancyEverSatisfied && !redundancySatisfied) {
       regionRedundancyTracker.decrementLowRedundancyBucketCount();
       redundancySatisfied = true;
     }
-    if (!hasAnyCopies) {
+    if (hasEverHadCopies && !hasAnyCopies) {
       regionRedundancyTracker.decrementNoCopiesBucketCount();
       hasAnyCopies = true;
     }


Mime
View raw message