ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [3/3] ignite git commit: Added initialization of 'storeKeepBinary' flag for cache configurations received on discovery. (cherry picked from commit abe44f9)
Date Thu, 21 Jan 2016 09:39:59 GMT
Added initialization of 'storeKeepBinary' flag for cache configurations received on discovery.
(cherry picked from commit abe44f9)


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

Branch: refs/heads/ignite-1.5.4
Commit: dc261786dea5f9af75cf8f81775c18eff8a89543
Parents: 782e743
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Jan 21 12:20:04 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Jan 21 12:30:15 2016 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheProcessor.java    | 23 +++++++++++++++-----
 1 file changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dc261786/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 5dabbef..6b734b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -1899,12 +1899,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             }
             else {
                 for (DynamicCacheChangeRequest req : batch.requests()) {
-                    if (req.startCacheConfiguration() != null) {
-                        CacheConfiguration ccfg = req.startCacheConfiguration();
-
-                        if (ccfg.isStoreKeepBinary() == null)
-                            ccfg.setStoreKeepBinary(CacheConfiguration.DFLT_STORE_KEEP_BINARY);
-                    }
+                    initReceivedCacheConfiguration(req);
 
                     if (req.template()) {
                         CacheConfiguration ccfg = req.startCacheConfiguration();
@@ -1997,6 +1992,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         for (DynamicCacheChangeRequest req : batch.requests()) {
             assert !req.template() : req;
 
+            initReceivedCacheConfiguration(req);
+
             String name = req.cacheName();
 
             boolean sysCache = CU.isMarshallerCache(name) || CU.isUtilityCache(name) || CU.isAtomicsCache(name);
@@ -2427,6 +2424,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         boolean incMinorTopVer = false;
 
         for (DynamicCacheChangeRequest req : batch.requests()) {
+            initReceivedCacheConfiguration(req);
+
             if (req.template()) {
                 CacheConfiguration ccfg = req.startCacheConfiguration();
 
@@ -2571,6 +2570,18 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * @param req Cache change request.
+     */
+    private void initReceivedCacheConfiguration(DynamicCacheChangeRequest req) {
+        if (req.startCacheConfiguration() != null) {
+            CacheConfiguration ccfg = req.startCacheConfiguration();
+
+            if (ccfg.isStoreKeepBinary() == null)
+                ccfg.setStoreKeepBinary(CacheConfiguration.DFLT_STORE_KEEP_BINARY);
+        }
+    }
+
+    /**
      * Checks that preload-order-dependant caches has SYNC or ASYNC preloading mode.
      *
      * @param cfgs Caches.


Mime
View raw message