You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2016/06/02 00:09:54 UTC
[07/50] [abbrv] incubator-geode git commit: removed
memberUnInitialized
removed memberUnInitialized
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e470fb23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e470fb23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e470fb23
Branch: refs/heads/feature/GEODE-1464
Commit: e470fb23dfb2f99c321c82f3a6bcb79c704a4974
Parents: 800c9cb
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Jun 1 15:23:19 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Jun 1 15:23:19 2016 -0700
----------------------------------------------------------------------
.../cache/CacheDistributionAdvisor.java | 28 +++-----------------
.../internal/cache/DistributedRegion.java | 4 +--
.../gemfire/internal/cache/LocalRegion.java | 7 +++--
3 files changed, 7 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e470fb23/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java
index 4a34771..89736ce 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java
@@ -87,7 +87,7 @@ public class CacheDistributionAdvisor extends DistributionAdvisor {
protected static final int REQUIRES_NOTIFICATION_MASK = 0x8000;
private static final int HAS_CACHE_SERVER_MASK = 0x10000;
private static final int REQUIRES_OLD_VALUE_MASK = 0x20000;
- private static final int MEMBER_UNINITIALIZED_MASK = 0x40000;
+ // unused 0x40000;
private static final int PERSISTENCE_INITIALIZED_MASK = 0x80000;
//Important below mentioned bit masks are not available
/**
@@ -227,8 +227,7 @@ public class CacheDistributionAdvisor extends DistributionAdvisor {
CacheProfile prof = (CacheProfile)profile;
// if region in cache is not yet initialized, exclude
- if (!prof.regionInitialized // fix for bug 41102
- || prof.memberUnInitialized) {
+ if (!prof.regionInitialized) { // fix for bug 41102
return false;
}
@@ -267,10 +266,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor {
if (!cp.regionInitialized) {
return false;
}
- // if member is not yet initialized, exclude
- if (cp.memberUnInitialized) {
- return false;
- }
if (!cp.cachedOrAllEventsWithListener()) {
return false;
}
@@ -325,8 +320,7 @@ public class CacheDistributionAdvisor extends DistributionAdvisor {
public boolean include(Profile profile) {
assert profile instanceof CacheProfile;
CacheProfile cp = (CacheProfile)profile;
- if (cp.dataPolicy.withReplication() && cp.regionInitialized
- && !cp.memberUnInitialized) {
+ if (cp.dataPolicy.withReplication() && cp.regionInitialized) {
return true;
}
return false;
@@ -348,10 +342,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor {
if (!cp.regionInitialized) {
return false;
}
- // if member is not yet initialized, exclude
- if (cp.memberUnInitialized) {
- return false;
- }
DataPolicy dp = cp.dataPolicy;
return dp.withStorage();
}
@@ -542,14 +532,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor {
*/
public boolean regionInitialized;
- /**
- * True when member is still not ready to receive cache operations. Note
- * that {@link #regionInitialized} may be still true so other members can
- * proceed with GII etc. Currently used by SQLFabric to indicate that DDL
- * replay is in progress and so cache operations/functions should not be
- * routed to that node.
- */
- public boolean memberUnInitialized = false;
/**
* True when a members persistent store is initialized. Note that
@@ -611,7 +593,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor {
if (this.isGatewayEnabled) s |= IS_GATEWAY_ENABLED_MASK;
if (this.isPersistent) s |= PERSISTENT_MASK;
if (this.regionInitialized) s|= REGION_INITIALIZED_MASK;
- if (this.memberUnInitialized) s |= MEMBER_UNINITIALIZED_MASK;
if (this.persistentID != null) s|= PERSISTENT_ID_MASK;
if (this.hasCacheServer) s|= HAS_CACHE_SERVER_MASK;
if (this.requiresOldValueInEvents) s|= REQUIRES_OLD_VALUE_MASK;
@@ -688,7 +669,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor {
this.isGatewayEnabled = (s & IS_GATEWAY_ENABLED_MASK) != 0;
this.isPersistent = (s & PERSISTENT_MASK) != 0;
this.regionInitialized = ( (s & REGION_INITIALIZED_MASK) != 0 );
- this.memberUnInitialized = (s & MEMBER_UNINITIALIZED_MASK) != 0;
this.hasCacheServer = ( (s & HAS_CACHE_SERVER_MASK) != 0 );
this.requiresOldValueInEvents = ((s & REQUIRES_OLD_VALUE_MASK) != 0);
this.persistenceInitialized = (s & PERSISTENCE_INITIALIZED_MASK) != 0;
@@ -871,8 +851,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor {
sb.append("; scope=" + this.scope);
sb.append("; regionInitialized=").append(
String.valueOf(this.regionInitialized));
- sb.append("; memberUnInitialized=").append(
- String.valueOf(this.memberUnInitialized));
sb.append("; inRecovery=" + this.inRecovery);
sb.append("; subcription=" + this.subscriptionAttributes);
sb.append("; isPartitioned=" + this.isPartitioned);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e470fb23/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
index 38a9686..406ac33 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
@@ -2300,7 +2300,6 @@ public class DistributedRegion extends LocalRegion implements
}
profile.serialNumber = getSerialNumber();
profile.regionInitialized = this.isInitialized();
- profile.memberUnInitialized = false;
profile.persistentID = getPersistentID();
if(getPersistenceAdvisor() != null) {
profile.persistenceInitialized = getPersistenceAdvisor().isOnline();
@@ -4049,8 +4048,7 @@ public class DistributedRegion extends LocalRegion implements
if (this.randIndex < 0) {
this.randIndex = PartitionedRegion.rand.nextInt(numProfiles);
}
- if (cp.dataPolicy.withReplication() && cp.regionInitialized
- && !cp.memberUnInitialized) {
+ if (cp.dataPolicy.withReplication() && cp.regionInitialized) {
if (onlyPersistent && !cp.dataPolicy.withPersistence()) {
return true;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e470fb23/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index 7357f0c..566fde6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -11072,8 +11072,7 @@ public class LocalRegion extends AbstractRegion
final CacheProfile prof = (CacheProfile)profile;
// if region in cache is not yet initialized, exclude
- if (prof.regionInitialized // fix for bug 41102
- && !prof.memberUnInitialized) {
+ if (prof.regionInitialized) { // fix for bug 41102
// cut the visit short if we find a CacheLoader
return !prof.hasCacheLoader;
}
@@ -11090,8 +11089,8 @@ public class LocalRegion extends AbstractRegion
assert profile instanceof CacheProfile;
final CacheProfile prof = (CacheProfile)profile;
- // if region in cache is in recovery, or member not initialized exclude
- if (!prof.inRecovery && !prof.memberUnInitialized) {
+ // if region in cache is in recovery
+ if (!prof.inRecovery) {
// cut the visit short if we find a CacheWriter
return !prof.hasCacheWriter;
}