ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: #sberb-27: do not save to local store on client.
Date Thu, 11 Jun 2015 12:06:13 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/sberb-27 [created] f64ff3eab


#sberb-27: do not save to local store on client.


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

Branch: refs/heads/sberb-27
Commit: f64ff3eabaf670914ceef2090702ccea2e536d9e
Parents: 89a4f7c
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Jun 11 15:05:49 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Jun 11 15:05:49 2015 +0300

----------------------------------------------------------------------
 .../transactions/IgniteTxLocalAdapter.java      | 28 ++++++++++++--------
 1 file changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f64ff3ea/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 8b5eaec..79ca164 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -503,6 +503,10 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     boolean skipNear = near() && isWriteToStoreFromDht;
 
                     for (IgniteTxEntry e : writeEntries) {
+                        if (e.context().store() != null &&
+                            e.context().store().isLocal() && cctx.gridConfig().isClientMode())
+                            continue;
+
                         if ((skipNear && e.cached().isNear()) || e.skipStore())
                             continue;
 
@@ -612,20 +616,22 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                             log.debug("Ignoring NOOP entry for batch store commit: " + e);
                     }
 
-                    if (putMap != null && !putMap.isEmpty()) {
-                        assert rmvCol == null || rmvCol.isEmpty();
-                        assert writeStore != null;
+                    if (writeStore != null && !(writeStore.isLocal() && cctx.gridConfig().isClientMode()))
{
+                        if (putMap != null && !putMap.isEmpty()) {
+                            assert rmvCol == null || rmvCol.isEmpty();
+                            assert writeStore != null;
 
-                        // Batch put at the end of transaction.
-                        writeStore.putAll(this, putMap);
-                    }
+                            // Batch put at the end of transaction.
+                            writeStore.putAll(this, putMap);
+                        }
 
-                    if (rmvCol != null && !rmvCol.isEmpty()) {
-                        assert putMap == null || putMap.isEmpty();
-                        assert writeStore != null;
+                        if (rmvCol != null && !rmvCol.isEmpty()) {
+                            assert putMap == null || putMap.isEmpty();
+                            assert writeStore != null;
 
-                        // Batch remove at the end of transaction.
-                        writeStore.removeAll(this, rmvCol);
+                            // Batch remove at the end of transaction.
+                            writeStore.removeAll(this, rmvCol);
+                        }
                     }
                 }
 


Mime
View raw message