You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ja...@apache.org on 2017/05/03 20:39:18 UTC
geode git commit: GEODE-2870: Local node function execution failure
correctly returns exception
Repository: geode
Updated Branches:
refs/heads/feature/GEODE-2870 [created] d7671df87
GEODE-2870: Local node function execution failure correctly returns exception
* Race condition and escaping synchronized block led to function possibly missing results
* It was possible a remote node would enter the synchronized block after local node threw exception
* Certain side effects would allow processing of remote node results to be considered last result
* Local processing thread would be paused/non active and miss opportunity to write exception
* This would manifest as incomplete results instead of a retry
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/d7671df8
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/d7671df8
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/d7671df8
Branch: refs/heads/feature/GEODE-2870
Commit: d7671df8788fa926967ef35a71b95b21ffd41726
Parents: 1683265
Author: Jason Huynh <hu...@gmail.com>
Authored: Tue May 2 16:30:46 2017 -0700
Committer: Jason Huynh <hu...@gmail.com>
Committed: Wed May 3 12:56:52 2017 -0700
----------------------------------------------------------------------
.../execute/PartitionedRegionFunctionResultSender.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/d7671df8/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionResultSender.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionResultSender.java b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionResultSender.java
index 3b27cb4..35dde77 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionResultSender.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionResultSender.java
@@ -214,16 +214,15 @@ public final class PartitionedRegionFunctionResultSender implements InternalResu
private synchronized void lastResult(Object oneResult, ResultCollector collector,
boolean lastRemoteResult, boolean lastLocalResult, DistributedMember memberID) {
+
+ boolean completedLocal = lastLocalResult | this.localLastResultRecieved;
if (lastRemoteResult) {
this.completelyDoneFromRemote = true;
}
- if (lastLocalResult) {
- this.localLastResultRecieved = true;
- }
if (this.serverSender != null) { // Client-Server
- if (this.completelyDoneFromRemote && this.localLastResultRecieved) {
+ if (this.completelyDoneFromRemote && completedLocal) {
if (lastLocalResult) {
checkForBucketMovement(oneResult);
if (bme != null) {
@@ -252,7 +251,7 @@ public final class PartitionedRegionFunctionResultSender implements InternalResu
}
} else { // P2P
- if (this.completelyDoneFromRemote && this.localLastResultRecieved) {
+ if (this.completelyDoneFromRemote && completedLocal) {
if (lastLocalResult) {
checkForBucketMovement(oneResult);
if (bme != null) {
@@ -279,6 +278,9 @@ public final class PartitionedRegionFunctionResultSender implements InternalResu
}
}
}
+ if (lastLocalResult) {
+ this.localLastResultRecieved = true;
+ }
}
public synchronized void lastResult(Object oneResult, boolean completelyDoneFromRemote,