You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by zh...@apache.org on 2017/04/10 03:14:59 UTC
geode git commit: fix 2
Repository: geode
Updated Branches:
refs/heads/feature/GEM-1353 72bc82e02 -> e7ba045c7
fix 2
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/e7ba045c
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/e7ba045c
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/e7ba045c
Branch: refs/heads/feature/GEM-1353
Commit: e7ba045c726114acec598f24bb7a49fd52c0a9f4
Parents: 72bc82e
Author: zhouxh <gz...@pivotal.io>
Authored: Sun Apr 9 20:14:45 2017 -0700
Committer: zhouxh <gz...@pivotal.io>
Committed: Sun Apr 9 20:14:45 2017 -0700
----------------------------------------------------------------------
.../distributed/internal/DistributionAdvisor.java | 7 ++-----
.../internal/cache/DistributedCacheOperation.java | 10 ----------
.../geode/internal/cache/LocalRegionDataView.java | 18 ++++++++++++++----
3 files changed, 16 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/e7ba045c/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java
index 903f10d..1d3dc86 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java
@@ -159,13 +159,13 @@ public class DistributionAdvisor {
* the number of operations in-progress for previous versions of the profile set. Guarded by
* opCountLock
*/
- public long previousVersionOpCount;
+ private long previousVersionOpCount;
/**
* the number of operations in-progress for the current version of the profile set. Guarded by
* opCountLock
*/
- public long currentVersionOpCount;
+ private long currentVersionOpCount;
/**
* Hold onto removed profiles to compare to late-processed profiles. Fix for bug 36881. Protected
@@ -740,7 +740,6 @@ public class DistributionAdvisor {
}
synchronized (this.opCountLock) {
currentVersionOpCount++;
- // logger.info("GGG:startOp:"+this.currentVersionOpCount, new Exception());
if (logger.isTraceEnabled(LogMarker.STATE_FLUSH_OP)) {
logger.trace(LogMarker.STATE_FLUSH_OP, "StateFlush current opcount incremented: {}",
currentVersionOpCount);
@@ -760,14 +759,12 @@ public class DistributionAdvisor {
synchronized (this.opCountLock) {
if (version == membershipVersion) {
currentVersionOpCount--;
- // logger.info("GGG:endOp:"+this.currentVersionOpCount, new Exception());
if (logger.isTraceEnabled(LogMarker.STATE_FLUSH_OP)) {
logger.trace(LogMarker.STATE_FLUSH_OP, "StateFlush current opcount deccremented: {}",
currentVersionOpCount);
}
} else {
previousVersionOpCount--;
- // logger.info("GGG:endOp2:" + this.previousVersionOpCount, new Exception());
if (logger.isTraceEnabled(LogMarker.STATE_FLUSH_OP)) {
logger.trace(LogMarker.STATE_FLUSH_OP, "StateFlush previous opcount incremented: {}",
previousVersionOpCount);
http://git-wip-us.apache.org/repos/asf/geode/blob/e7ba045c/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java
index 00912d4..b77c80c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java
@@ -250,9 +250,6 @@ public abstract class DistributedCacheOperation {
logger.trace(LogMarker.STATE_FLUSH_OP, "dispatching operation in view version {}",
viewVersion);
}
- // logger.info("GGG:startOp:" + viewVersion + ":" + region.getFullPath() + ":"
- // + region.getDistributionAdvisor().currentVersionOpCount + ":"
- // + region.getDistributionAdvisor().previousVersionOpCount, new Exception());
return viewVersion;
}
@@ -264,13 +261,6 @@ public abstract class DistributedCacheOperation {
logger.trace(LogMarker.STATE_FLUSH_OP, "done dispatching operation in view version {}",
viewVersion);
}
- // logger.info("GGG:endOp:" + viewVersion + ":" + region.getFullPath() + ":"
- // + region.getDistributionAdvisor().currentVersionOpCount + ":"
- // + region.getDistributionAdvisor().previousVersionOpCount, new Exception());
- } else {
- // logger.info("GGG:ENDOP:" + viewVersion + ":" + region.getFullPath()
- // + region.getDistributionAdvisor().currentVersionOpCount + ":"
- // + region.getDistributionAdvisor().previousVersionOpCount, new Exception());
}
}
http://git-wip-us.apache.org/repos/asf/geode/blob/e7ba045c/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegionDataView.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegionDataView.java b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegionDataView.java
index 6361aa6..3d7418f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegionDataView.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegionDataView.java
@@ -312,12 +312,17 @@ public class LocalRegionDataView implements InternalDataView {
putallOp.fillVersionedObjectList(successfulPuts);
}
// BR & DR's putAll
- long viewVersion = putallOp.startOperation();
+ long viewVersion = -1;
try {
+ if (region instanceof DistributedRegion) {
+ viewVersion = putallOp.startOperation();
+ }
region.postPutAllSend(putallOp, successfulPuts);
region.postPutAllFireEvents(putallOp, successfulPuts);
} finally {
- putallOp.endOperation(viewVersion);
+ if (region instanceof DistributedRegion) {
+ putallOp.endOperation(viewVersion);
+ }
}
}
@@ -332,12 +337,17 @@ public class LocalRegionDataView implements InternalDataView {
op.fillVersionedObjectList(successfulOps);
}
// BR, DR's removeAll
- long viewVersion = op.startOperation();
+ long viewVersion = -1;
try {
+ if (region instanceof DistributedRegion) {
+ viewVersion = op.startOperation();
+ }
region.postRemoveAllSend(op, successfulOps);
region.postRemoveAllFireEvents(op, successfulOps);
} finally {
- op.endOperation(viewVersion);
+ if (region instanceof DistributedRegion) {
+ op.endOperation(viewVersion);
+ }
}
}
}