geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aging...@apache.org
Subject geode git commit: GEODE-2489: Avoid sending tombstone GC messages to peer nodes if there is no client registration
Date Fri, 24 Feb 2017 20:34:47 GMT
Repository: geode
Updated Branches:
  refs/heads/develop 8e22ea213 -> 03ea8e8fe


GEODE-2489: Avoid sending tombstone GC messages to peer nodes if there is no client registration

When tombstones are removed, tombstone messages are sent to region replicas; and in case of
Partitioned Region (PR) messages are also sent to peer region nodes for client events.

Currently tombstone messages meant for clients that have all the keys removed are getting
sent to peer PR nodes even though no clients are registered on those peers.


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

Branch: refs/heads/develop
Commit: 03ea8e8fe91d2a203b3cf2ee372309e9cd3db506
Parents: 8e22ea2
Author: Anil <agingade@pivotal.io>
Authored: Fri Feb 24 12:34:13 2017 -0800
Committer: Anil <agingade@pivotal.io>
Committed: Fri Feb 24 12:34:13 2017 -0800

----------------------------------------------------------------------
 .../apache/geode/internal/cache/partitioned/RegionAdvisor.java | 6 ++++--
 .../org/apache/geode/cache30/ClientServerCCEDUnitTest.java     | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/03ea8e8f/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java
index 84b0aad..8f4c65c 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java
@@ -1008,7 +1008,8 @@ public class RegionAdvisor extends CacheDistributionAdvisor {
     return adviseFilter(new Filter() {
       public boolean include(Profile profile) {
         CacheProfile prof = (CacheProfile) profile;
-        return prof.hasCacheServer && prof.filterProfile.hasInterest();
+        return prof.hasCacheServer && prof.filterProfile != null
+            && prof.filterProfile.hasInterest();
       }
     });
   }
@@ -1016,7 +1017,8 @@ public class RegionAdvisor extends CacheDistributionAdvisor {
   private static final Filter prServerWithInterestFilter = new Filter() {
     public boolean include(Profile profile) {
       CacheProfile prof = (CacheProfile) profile;
-      return prof.isPartitioned && prof.hasCacheServer && prof.filterProfile.hasInterest();
+      return prof.isPartitioned && prof.hasCacheServer && prof.filterProfile
!= null
+          && prof.filterProfile.hasInterest();
     }
   };
 

http://git-wip-us.apache.org/repos/asf/geode/blob/03ea8e8f/geode-core/src/test/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java
index e749336..b4224e0 100644
--- a/geode-core/src/test/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java
@@ -260,6 +260,7 @@ public class ClientServerCCEDUnitTest extends JUnit4CacheTestCase {
     }
   }
 
+  @Test
   public void testTombstoneGcMessagesAreOnlySentToPRNodesWithInterestRegistration() {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);


Mime
View raw message