You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/05/29 07:46:19 UTC
[09/11] ignite git commit: Fixed unhandled
GridDhtInvalidPartitionException.
Fixed unhandled GridDhtInvalidPartitionException.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/164e3188
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/164e3188
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/164e3188
Branch: refs/heads/ignite-5267
Commit: 164e3188f303b3565a53634be713917b0f6e2e85
Parents: 9c3028a
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Fri May 26 16:08:57 2017 +0300
Committer: Ilya Lantukh <il...@gridgain.com>
Committed: Fri May 26 16:08:57 2017 +0300
----------------------------------------------------------------------
.../distributed/dht/GridDhtGetSingleFuture.java | 27 ++++++++++++--------
1 file changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/164e3188/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
index d93831d..9a7cfdc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetSingleFuture.java
@@ -265,23 +265,28 @@ public final class GridDhtGetSingleFuture<K, V> extends GridFutureAdapter<GridCa
* @return {@code True} if mapped.
*/
private boolean map(KeyCacheObject key) {
- GridDhtLocalPartition part = topVer.topologyVersion() > 0 ?
- cache().topology().localPartition(cctx.affinity().partition(key), topVer, true) :
- cache().topology().localPartition(key, false);
+ try {
+ GridDhtLocalPartition part = topVer.topologyVersion() > 0 ?
+ cache().topology().localPartition(cctx.affinity().partition(key), topVer, true) :
+ cache().topology().localPartition(key, false);
- if (part == null)
- return false;
+ if (part == null)
+ return false;
- assert this.part == -1;
+ assert this.part == -1;
- // By reserving, we make sure that partition won't be unloaded while processed.
- if (part.reserve()) {
- this.part = part.id();
+ // By reserving, we make sure that partition won't be unloaded while processed.
+ if (part.reserve()) {
+ this.part = part.id();
- return true;
+ return true;
+ }
+ else
+ return false;
}
- else
+ catch (GridDhtInvalidPartitionException ex) {
return false;
+ }
}
/**