ignite-3116 Fixed NodeStoppingException in GridDhtGetFuture. (cherry picked from commit 303d3ca)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1bb8b647 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1bb8b647 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1bb8b647 Branch: refs/heads/master Commit: 1bb8b647264593034659b7db929c2664dec603e1 Parents: 2f1747d Author: sboikov <[email protected]> Authored: Fri May 27 14:21:01 2016 +0300 Committer: sboikov <[email protected]> Committed: Fri May 27 15:37:58 2016 +0300 ---------------------------------------------------------------------- .../distributed/dht/GridDhtCacheAdapter.java | 7 +++++++ .../cache/distributed/dht/GridDhtGetFuture.java | 19 ++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb8b647/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java index 9f15bf4..5688b61 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java @@ -36,6 +36,7 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.NodeStoppingException; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.CacheObject; import org.apache.ignite.internal.processors.cache.CacheOperationContext; @@ -813,6 +814,9 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap req.addDeploymentInfo()); } } + catch (NodeStoppingException e) { + return; + } catch (IgniteCheckedException e) { U.error(log, "Failed processing get request: " + req, e); @@ -878,6 +882,9 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap res.entries(entries); } + catch (NodeStoppingException e) { + return; + } catch (IgniteCheckedException e) { U.error(log, "Failed processing get request: " + req, e); http://git-wip-us.apache.org/repos/asf/ignite/blob/1bb8b647/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java index e12e1ab..913580f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java @@ -179,17 +179,14 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col retries.addAll(fut.invalidPartitions()); } - fut.listen(new CI1<IgniteInternalFuture<Object>>() { - @Override public void apply(IgniteInternalFuture<Object> fut) { - try { - fut.get(); - } - catch (NodeStoppingException e) { - return; - } - catch (IgniteCheckedException e) { - if (log.isDebugEnabled()) - log.debug("Failed to request keys from preloader [keys=" + keys + ", err=" + e + ']'); + fut.listen(new CI1<IgniteInternalFuture<Object>>() { + @Override public void apply(IgniteInternalFuture<Object> fut) { + try { + fut.get(); + } + catch (IgniteCheckedException e) { + if (log.isDebugEnabled()) + log.debug("Failed to request keys from preloader [keys=" + keys + ", err=" + e + ']'); onDone(e);
