ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [5/8] incubator-ignite git commit: GG-9141 - Fixes for DR.
Date Fri, 19 Dec 2014 03:22:02 GMT
GG-9141 - Fixes for DR.


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

Branch: refs/heads/ignite-1
Commit: 246bc860cb477e8ba7061546aa7c9c55bf9c6729
Parents: 72b82b2
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Thu Dec 18 16:16:27 2014 -0800
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Thu Dec 18 16:16:27 2014 -0800

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      |  6 ++++-
 .../processors/cache/GridCacheMvccManager.java  |  4 ++--
 .../GridCachePartitionExchangeManager.java      | 10 ++++++---
 .../processors/cache/GridCacheProcessor.java    | 23 ++++++++++----------
 4 files changed, 26 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246bc860/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
index b5bd597..92b5e62 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
@@ -3136,7 +3136,11 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter
im
     /** {@inheritDoc} */
     @Override public GridCacheTx txStart(GridCacheTxConcurrency concurrency,
         GridCacheTxIsolation isolation, long timeout, int txSize) throws IllegalStateException
{
-        return ctx.kernalContext().cache().transactions().txStart(concurrency, isolation,
timeout, txSize);
+        IgniteTransactionsEx txs = ctx.kernalContext().cache().transactions();
+
+        return ctx.system() ?
+            txs.txStartSystem(concurrency, isolation, timeout, txSize) :
+            txs.txStart(concurrency, isolation, timeout, txSize);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246bc860/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java
index 10a953b..93bf3fa 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheMvccManager.java
@@ -13,7 +13,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.managers.discovery.*;
 import org.gridgain.grid.kernal.managers.eventstorage.*;
@@ -408,9 +407,10 @@ public class GridCacheMvccManager<K, V> extends GridCacheSharedManagerAdapter<K,
 
         // Close window in case of node is gone before the future got added to
         // the map of futures.
-        for (ClusterNode n : fut.nodes())
+        for (ClusterNode n : fut.nodes()) {
             if (cctx.discovery().node(n.id()) == null)
                 fut.onNodeLeft(n.id());
+        }
 
         // Just in case if future was complete before it was added.
         if (fut.isDone())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246bc860/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java
index 201b960..8ca5911 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionExchangeManager.java
@@ -548,9 +548,13 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
      * @param exchFut Exchange.
      */
     public void onExchangeDone(GridDhtPartitionsExchangeFuture<K, V> exchFut) {
-        for (GridDhtPartitionsExchangeFuture<K, V> fut : exchFuts.values()) {
-            if (fut.exchangeId().topologyVersion() < exchFut.exchangeId().topologyVersion()
- 10)
-                fut.cleanUp();
+        ExchangeFutureSet exchFuts0 = exchFuts;
+
+        if (exchFuts0 != null) {
+            for (GridDhtPartitionsExchangeFuture<K, V> fut : exchFuts0.values()) {
+                if (fut.exchangeId().topologyVersion() < exchFut.exchangeId().topologyVersion()
- 10)
+                    fut.cleanUp();
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246bc860/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java
index 1c08267..9f11834 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheProcessor.java
@@ -15,6 +15,7 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.fs.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.lifecycle.LifecycleAware;
 import org.apache.ignite.spi.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
@@ -1292,15 +1293,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             }
         }
 
-        List<? extends GridCacheSharedManager<?, ?>> sharedMgrs = sharedCtx.managers();
-
-        for (ListIterator<? extends GridCacheSharedManager<?, ?>> it = sharedMgrs.listIterator(sharedMgrs.size());
-            it.hasPrevious();) {
-            GridCacheSharedManager<?, ?> mgr = it.previous();
-
-            mgr.onKernalStop(cancel);
-        }
-
         for (GridCacheAdapter<?, ?> cache : stopSeq) {
             GridCacheContext ctx = cache.context();
 
@@ -1331,6 +1323,15 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
             cache.onKernalStop();
         }
+
+        List<? extends GridCacheSharedManager<?, ?>> sharedMgrs = sharedCtx.managers();
+
+        for (ListIterator<? extends GridCacheSharedManager<?, ?>> it = sharedMgrs.listIterator(sharedMgrs.size());
+            it.hasPrevious();) {
+            GridCacheSharedManager<?, ?> mgr = it.previous();
+
+            mgr.onKernalStop(cancel);
+        }
     }
 
     /** {@inheritDoc} */
@@ -1662,7 +1663,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     /**
      * @return Transactions interface implementation.
      */
-    public IgniteTransactions transactions() {
+    public IgniteTransactionsEx transactions() {
         return transactions;
     }
 
@@ -1767,7 +1768,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     /**
      * @param ccfg Cache configuration.
      * @param objs Extra components.
-     * @return Components provided in cache configuration which can implement {@link org.apache.ignite.lifecycle.LifecycleAware}
interface.
+     * @return Components provided in cache configuration which can implement {@link LifecycleAware}
interface.
      */
     private Iterable<Object> lifecycleAwares(GridCacheConfiguration ccfg, Object...objs)
{
         Collection<Object> ret = new ArrayList<>(7 + objs.length);


Mime
View raw message