ignite-1.5 Fixed NPE in GridPartitionedSingleGetFuture.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1224658f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1224658f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1224658f Branch: refs/heads/ignite-2100 Commit: 1224658fe0d4b572b9980fa5de65bbb043646377 Parents: 68d3179 Author: sboikov <[email protected]> Authored: Mon Dec 14 13:17:06 2015 +0300 Committer: sboikov <[email protected]> Committed: Mon Dec 14 13:17:06 2015 +0300 ---------------------------------------------------------------------- .../distributed/dht/GridPartitionedSingleGetFuture.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/1224658f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java index 23e7c9a..f3f225a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java @@ -416,7 +416,8 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object> im * @param res Result. */ public void onResult(UUID nodeId, GridNearSingleGetResponse res) { - if (!processResponse(nodeId) || !checkError(res.error(), res.invalidPartitions(), res.topologyVersion())) + if (!processResponse(nodeId) || + !checkError(res.error(), res.invalidPartitions(), res.topologyVersion(), nodeId)) return; Message res0 = res.result(); @@ -451,7 +452,7 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object> im */ @Override public void onResult(UUID nodeId, GridNearGetResponse res) { if (!processResponse(nodeId) || - !checkError(res.error(), !F.isEmpty(res.invalidPartitions()), res.topologyVersion())) + !checkError(res.error(), !F.isEmpty(res.invalidPartitions()), res.topologyVersion(), nodeId)) return; Collection<GridCacheEntryInfo> infos = res.entries(); @@ -481,10 +482,13 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object> im * @param err Error. * @param invalidParts Invalid partitions error flag. * @param rmtTopVer Received topology version. + * @param nodeId Node ID. + * @return {@code True} if should process received response. */ private boolean checkError(@Nullable IgniteCheckedException err, boolean invalidParts, - AffinityTopologyVersion rmtTopVer) { + AffinityTopologyVersion rmtTopVer, + UUID nodeId) { if (err != null) { onDone(err); @@ -499,7 +503,7 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object> im onDone(new IgniteCheckedException("Failed to process invalid partitions response (remote node reported " + "invalid partitions but remote topology version does not differ from local) " + "[topVer=" + topVer + ", rmtTopVer=" + rmtTopVer + ", part=" + cctx.affinity().partition(key) + - ", nodeId=" + node.id() + ']')); + ", nodeId=" + nodeId + ']')); return false; }
