ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-5932
Date Mon, 16 Oct 2017 08:53:03 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5932 7049fe5af -> 01b5183b7


ignite-5932


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/01b5183b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/01b5183b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/01b5183b

Branch: refs/heads/ignite-5932
Commit: 01b5183b7b8990561fbdffde2ada2b0a70bcec56
Parents: 7049fe5
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Oct 16 11:52:50 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Oct 16 11:52:50 2017 +0300

----------------------------------------------------------------------
 .../GridNearOptimisticSerializableTxPrepareFuture.java    |  3 ++-
 .../near/GridNearOptimisticTxPrepareFuture.java           |  5 +++--
 .../near/GridNearPessimisticTxPrepareFuture.java          |  2 +-
 .../processors/cache/mvcc/CacheCoordinatorsProcessor.java | 10 ++++++++++
 .../internal/processors/cache/mvcc/MvccQueryTracker.java  |  2 +-
 5 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/01b5183b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
index b64fe9b..6c3bd13 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
@@ -38,6 +38,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxMapping;
+import org.apache.ignite.internal.processors.cache.mvcc.CacheCoordinatorsProcessor;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccCoordinator;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
@@ -363,7 +364,7 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
                 mvccCrd = cctx.affinity().mvccCoordinator(topVer);
 
                 if (mvccCrd == null) {
-                    onDone(new IgniteCheckedException("Mvcc coordinator is not assigned:
" + topVer));
+                    onDone(CacheCoordinatorsProcessor.noCoordinatorError(topVer));
 
                     return;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/01b5183b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index 342ecd4..b2a9da1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -41,6 +41,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxMapping;
+import org.apache.ignite.internal.processors.cache.mvcc.CacheCoordinatorsProcessor;
 import org.apache.ignite.internal.processors.cache.mvcc.MvccCoordinator;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
@@ -382,7 +383,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
             MvccCoordinator mvccCrd = write.context().affinity().mvccCoordinator(topVer);
 
             if (mvccCrd == null) {
-                onDone(new IgniteCheckedException("Mvcc coordinator is not assigned: " +
topVer));
+                onDone(CacheCoordinatorsProcessor.noCoordinatorError(topVer));
 
                 return;
             }
@@ -450,7 +451,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
                 mvccCrd = write.context().affinity().mvccCoordinator(topVer);
 
                 if (mvccCrd == null) {
-                    onDone(new IgniteCheckedException("Mvcc coordinator is not assigned:
" + topVer));
+                    onDone(CacheCoordinatorsProcessor.noCoordinatorError(topVer));
 
                     break;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/01b5183b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
index 32c84bb..f7c516d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
@@ -301,7 +301,7 @@ public class GridNearPessimisticTxPrepareFuture extends GridNearTxPrepareFutureA
                 mvccCrd = cacheCtx.affinity().mvccCoordinator(topVer);
 
                 if (mvccCrd == null) {
-                    onDone(new IgniteCheckedException("Mvcc coordinator is not assigned:
" + topVer));
+                    onDone(CacheCoordinatorsProcessor.noCoordinatorError(topVer));
 
                     return;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/01b5183b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/CacheCoordinatorsProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/CacheCoordinatorsProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/CacheCoordinatorsProcessor.java
index 7b70f2e..27cbad9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/CacheCoordinatorsProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/CacheCoordinatorsProcessor.java
@@ -39,6 +39,7 @@ import org.apache.ignite.internal.IgniteDiagnosticPrepareContext;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
+import org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException;
 import org.apache.ignite.internal.managers.communication.GridMessageListener;
 import org.apache.ignite.internal.managers.discovery.DiscoCache;
 import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
@@ -170,6 +171,15 @@ public class CacheCoordinatorsProcessor extends GridProcessorAdapter
{
         return crdVer & CRD_VER_MASK;
     }
 
+    /**
+     * @param topVer Topology version for cache operation.
+     * @return Error.
+     */
+    public static IgniteCheckedException noCoordinatorError(AffinityTopologyVersion topVer)
{
+        return new ClusterTopologyServerNotFoundException("Mvcc coordinator is not assigned
for " +
+            "topology version: " + topVer);
+    }
+
     /** {@inheritDoc} */
     @Override public void start() throws IgniteCheckedException {
         statCntrs = new StatCounter[7];

http://git-wip-us.apache.org/repos/asf/ignite/blob/01b5183b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTracker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTracker.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTracker.java
index 04e5d5a..ad933d5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTracker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccQueryTracker.java
@@ -166,7 +166,7 @@ public class MvccQueryTracker implements MvccCoordinatorChangeAware {
         MvccCoordinator mvccCrd0 = cctx.affinity().mvccCoordinator(topVer);
 
         if (mvccCrd0 == null) {
-            lsnr.apply(null, new IgniteCheckedException("Mvcc coordinator is not assigned:
" + topVer));
+            lsnr.apply(null, CacheCoordinatorsProcessor.noCoordinatorError(topVer));
 
             return;
         }


Mime
View raw message