This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch gg-19225 in repository https://gitbox.apache.org/repos/asf/ignite.git
commit ba764c6c3edf14e499259090773f43f4a3ba52f6 Author: Andrey V. Mashenkov <[email protected]> AuthorDate: Wed Jun 5 14:07:49 2019 +0300 GG-19225: MVCC: Fix incorrect exception thrown. --- .../cache/distributed/dht/NotMappedPartitionInTxTest.java | 3 --- .../processors/query/h2/twostep/GridReduceQueryExecutor.java | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java index 75b6dd4..06d58ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/NotMappedPartitionInTxTest.java @@ -38,7 +38,6 @@ import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -115,7 +114,6 @@ public class NotMappedPartitionInTxTest extends GridCommonAbstractTest { /** * */ - @Ignore("https://issues.apache.org/jira/browse/IGNITE-10377") @Test public void testOneServerMvcc() throws Exception { try { @@ -160,7 +158,6 @@ public class NotMappedPartitionInTxTest extends GridCommonAbstractTest { /** * */ - @Ignore("https://issues.apache.org/jira/browse/IGNITE-10377") @Test public void testFourServersMvcc() throws Exception { try { diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java index 5c2c287..2a25263 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java @@ -47,6 +47,7 @@ import org.apache.ignite.IgniteClientDisconnectedException; import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteLogger; import org.apache.ignite.IgniteSystemProperties; +import org.apache.ignite.cache.CacheServerNotFoundException; import org.apache.ignite.cache.PartitionLossPolicy; import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.cluster.ClusterNode; @@ -513,7 +514,7 @@ public class GridReduceQueryExecutor { Set<ClusterNode> nodes = map.keySet(); if (F.isEmpty(map)) - throw new CacheException("Failed to find data nodes for cache: " + cctx.name()); + throw new CacheServerNotFoundException("Failed to find data nodes for cache: " + cctx.name()); for (int i = 1; i < cacheIds.size(); i++) { GridCacheContext<?,?> extraCctx = cacheContext(cacheIds.get(i)); @@ -531,7 +532,7 @@ public class GridReduceQueryExecutor { Set<ClusterNode> extraNodes = stableDataNodesMap(topVer, extraCctx, parts).keySet(); if (F.isEmpty(extraNodes)) - throw new CacheException("Failed to find data nodes for cache: " + extraCacheName); + throw new CacheServerNotFoundException("Failed to find data nodes for cache: " + extraCacheName); boolean disjoint; @@ -1404,7 +1405,7 @@ public class GridReduceQueryExecutor { Set<ClusterNode> dataNodes = new HashSet<>(dataNodes(cctx.groupId(), NONE)); if (dataNodes.isEmpty()) - throw new CacheException("Failed to find data nodes for cache: " + cacheName); + throw new CacheServerNotFoundException("Failed to find data nodes for cache: " + cacheName); // Find all the nodes owning all the partitions for replicated cache. for (int p = 0, parts = cctx.affinity().partitions(); p < parts; p++) { @@ -1484,7 +1485,7 @@ public class GridReduceQueryExecutor { return null; // Retry. } - throw new CacheException("Failed to find data nodes [cache=" + cctx.name() + ", part=" + p + "]"); + throw new CacheServerNotFoundException("Failed to find data nodes [cache=" + cctx.name() + ", part=" + p + "]"); } partLocs[p] = new HashSet<>(owners); @@ -1520,7 +1521,7 @@ public class GridReduceQueryExecutor { return null; // Retry. } - throw new CacheException("Failed to find data nodes [cache=" + extraCctx.name() + + throw new CacheServerNotFoundException("Failed to find data nodes [cache=" + extraCctx.name() + ", part=" + p + "]"); }
