You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by il...@apache.org on 2019/12/24 10:13:07 UTC

[ignite] branch master updated: IGNITE-12489 Fix log levels in GridCacheWriteBehindStore and CassandraSessionImpl - Fixes #7170.

This is an automated email from the ASF dual-hosted git repository.

ilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 89cf265  IGNITE-12489 Fix log levels in GridCacheWriteBehindStore and CassandraSessionImpl - Fixes #7170.
89cf265 is described below

commit 89cf2656adc628e89f907c2c02769f927acafc2d
Author: Sunny Chan, CLSA <su...@clsa.com>
AuthorDate: Tue Dec 24 13:12:43 2019 +0300

    IGNITE-12489 Fix log levels in GridCacheWriteBehindStore and CassandraSessionImpl - Fixes #7170.
    
    Signed-off-by: Ilya Kasnacheev <il...@gmail.com>
---
 .../cache/store/cassandra/session/CassandraSessionImpl.java    |  5 +++--
 .../processors/cache/store/GridCacheWriteBehindStore.java      | 10 ++++++----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java b/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java
index a54e078..73c593d 100644
--- a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java
+++ b/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java
@@ -47,6 +47,7 @@ import org.apache.ignite.cache.store.cassandra.persistence.KeyValuePersistenceSe
 import org.apache.ignite.cache.store.cassandra.session.pool.SessionPool;
 import org.apache.ignite.cache.store.cassandra.session.transaction.Mutation;
 import org.apache.ignite.internal.processors.cache.CacheEntryImpl;
+import org.apache.ignite.internal.util.typedef.internal.LT;
 
 /**
  * Implementation for {@link org.apache.ignite.cache.store.cassandra.session.CassandraSession}.
@@ -295,7 +296,7 @@ public class CassandraSessionImpl implements CassandraSession {
                     error = hostsAvailEx;
                 else if (prepStatEx != null)
                     error = prepStatEx;
-                
+
                 // Clean errors info before next communication with Cassandra.
                 unknownEx = null;
                 tblAbsenceEx = null;
@@ -365,7 +366,7 @@ public class CassandraSessionImpl implements CassandraSession {
             " of " + dataSize + " elements, during " + assistant.operationName() +
             " operation with Cassandra";
 
-        log.error(errorMsg, error);
+        LT.warn(log, error, errorMsg, false, false);
 
         throw new IgniteException(errorMsg, error);
     }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java
index c64dbc8..565ecd6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java
@@ -54,6 +54,7 @@ import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentLinkedHashMap;
 
 import static javax.cache.Cache.Entry;
+import static org.apache.ignite.internal.util.tostring.GridToStringBuilder.INCLUDE_SENSITIVE;
 
 /**
  * Internal wrapper for a {@link CacheStore} that enables write-behind logic.
@@ -890,7 +891,7 @@ public class GridCacheWriteBehindStore<K, V> implements CacheStore<K, V>, Lifecy
             }
         }
         catch (Exception e) {
-            LT.error(log, e, "Unable to update underlying store: " + store);
+            LT.warn(log, e, "Unable to update underlying store: " + store, false, false);
 
             boolean overflow;
 
@@ -903,9 +904,10 @@ public class GridCacheWriteBehindStore<K, V> implements CacheStore<K, V>, Lifecy
                 for (Map.Entry<K, Entry<? extends K, ? extends  V>> entry : vals.entrySet()) {
                     Object val = entry.getValue() != null ? entry.getValue().getValue() : null;
 
-                    log.warning("Failed to update store (value will be lost as current buffer size is greater " +
-                        "than 'cacheCriticalSize' or node has been stopped before store was repaired) [key=" +
-                        entry.getKey() + ", val=" + val + ", op=" + operation + "]");
+                    log.error("Failed to update store (value will be lost as current buffer size is greater " +
+                        "than 'cacheCriticalSize' or node has been stopped before store was repaired) [" +
+                        (INCLUDE_SENSITIVE ? "key=" + entry.getKey() + ", val=" + val + ", " : "") +
+                        "op=" + operation + "]");
                 }
 
                 return true;