ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [11/28] ignite git commit: IGNITE-5202 - Fixed memory configuration logging - Fixes #1930.
Date Tue, 04 Jul 2017 08:19:34 GMT
IGNITE-5202 - Fixed memory configuration logging - Fixes #1930.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>


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

Branch: refs/heads/ignite-2.1.2-exchange
Commit: 771288f4f76f81511498095e12130dc5d2899ce1
Parents: 9417040
Author: Sergey Chugunov <sergey.chugunov@gmail.com>
Authored: Fri Jun 30 10:10:11 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Fri Jun 30 10:10:11 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/IgniteKernal.java    | 11 ++++++++---
 .../internal/processors/cache/GridCacheProcessor.java    |  8 +++++++-
 2 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/771288f4/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 456acf9..4bc4dd5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -2461,7 +2461,12 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
             for (CacheConfiguration c : cacheCfgs) {
                 String cacheName = U.maskName(c.getName());
 
-                String memPlcName = U.maskName(c.getMemoryPolicyName());
+                String memPlcName = c.getMemoryPolicyName();
+
+                if (CU.isSystemCache(cacheName))
+                    memPlcName = "sysMemPlc";
+                else if (memPlcName == null && cfg.getMemoryConfiguration() != null)
+                    memPlcName = cfg.getMemoryConfiguration().getDefaultMemoryPolicyName();
 
                 if (!memPlcNamesMapping.containsKey(memPlcName))
                     memPlcNamesMapping.put(memPlcName, new ArrayList<String>());
@@ -2477,10 +2482,10 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
                 for (String s : e.getValue())
                     sb.a("'").a(s).a("', ");
 
-                sb.d(sb.length() - 2, sb.length()).a("]");
+                sb.d(sb.length() - 2, sb.length()).a("], ");
             }
 
-            U.log(log, "Configured caches [" + sb.toString() + ']');
+            U.log(log, "Configured caches [" + sb.d(sb.length() - 2, sb.length()).toString()
+ ']');
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/771288f4/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 96b45df..91325fd 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
@@ -1251,11 +1251,17 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         cacheCtx.onStarted();
 
+        String memPlcName = cfg.getMemoryPolicyName();
+
+        if (memPlcName == null
+            && ctx.config().getMemoryConfiguration() != null)
+            memPlcName = ctx.config().getMemoryConfiguration().getDefaultMemoryPolicyName();
+
 
         if (log.isInfoEnabled()) {
             log.info("Started cache [name=" + cfg.getName() +
                 (cfg.getGroupName() != null ? ", group=" + cfg.getGroupName() : "") +
-                ", memoryPolicyName=" + cfg.getMemoryPolicyName() +
+                ", memoryPolicyName=" + memPlcName +
                 ", mode=" + cfg.getCacheMode() +
                 ", atomicity=" + cfg.getAtomicityMode() + ']');
 }


Mime
View raw message