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:10:20 UTC
[33/50] [abbrv] incubator-geode git commit: rebalance no longer calls
GemFireCacheImpl.getInstance comments
rebalance no longer calls GemFireCacheImpl.getInstance
comments
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/05c78757
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/05c78757
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/05c78757
Branch: refs/heads/feature/GEODE-1464
Commit: 05c78757e3712ecb2e026149018fb2be83d5c696
Parents: 33ced83
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Jun 1 16:35:03 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Jun 1 16:35:03 2016 -0700
----------------------------------------------------------------------
.../partitioned/rebalance/PartitionedRegionLoadModel.java | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/05c78757/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
index 2859641..c98b9e6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
@@ -243,8 +243,7 @@ public class PartitionedRegionLoadModel {
// [sumedh] remove from buckets array too to be consistent since
// this method will be invoked repeatedly for all colocated regions,
// and then we may miss some colocated regions for a bucket leading
- // to all kinds of issues later (e.g. see SQLF test for #41472 that
- // shows some problems including NPEs, hangs etc.)
+ // to all kinds of issues later
this.buckets[i] = null;
continue;
}
@@ -555,18 +554,12 @@ public class PartitionedRegionLoadModel {
public Move findBestPrimaryMove() {
Move bestMove= null;
double bestImprovement = 0;
- GemFireCacheImpl cache = null;
for(Member source: this.members.values()) {
for(Bucket bucket: source.getPrimaryBuckets()) {
for(Member target: bucket.getMembersHosting()) {
if(source.equals(target)) {
continue;
}
- // If node is not fully initialized yet, then skip this node
- // (SQLFabric DDL replay in progress).
- if (cache == null) {
- cache = GemFireCacheImpl.getInstance();
- }
double improvement = improvement(source.getPrimaryLoad(), source
.getWeight(), target.getPrimaryLoad(), target.getWeight(), bucket.getPrimaryLoad(),
getPrimaryAverage());