ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [14/23] ignite git commit: Warning is writeThrough==false && writeBehind==true
Date Wed, 11 Nov 2015 16:17:33 GMT
Warning is writeThrough==false && writeBehind==true


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

Branch: refs/heads/ignite-1.5-atomic-opt
Commit: 50ede23a1079271cd21c338968bf936623416a16
Parents: 3de9d47
Author: Valentin Kulichenko <valentin.kulichenko@gmail.com>
Authored: Tue Nov 10 16:44:27 2015 -0800
Committer: Valentin Kulichenko <valentin.kulichenko@gmail.com>
Committed: Tue Nov 10 16:44:27 2015 -0800

----------------------------------------------------------------------
 .../store/GridCacheStoreManagerAdapter.java     | 26 ++++++++++++++------
 1 file changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/50ede23a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
index 174e1ce..dd54da5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
@@ -188,12 +188,24 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
 
         CacheConfiguration cfg = cctx.config();
 
-        if (cfgStore != null && !cfg.isWriteThrough() && !cfg.isReadThrough())
{
-            U.quietAndWarn(log,
-                "Persistence store is configured, but both read-through and write-through
are disabled. This " +
-                "configuration makes sense if the store implements loadCache method only.
If this is the " +
-                "case, ignore this warning. Otherwise, fix the configuration for cache: "
+ cfg.getName(),
-                "Persistence store is configured, but both read-through and write-through
are disabled.");
+        if (cfgStore != null) {
+            if (!cfg.isWriteThrough() && !cfg.isReadThrough()) {
+                U.quietAndWarn(log,
+                    "Persistence store is configured, but both read-through and write-through
are disabled. This " +
+                    "configuration makes sense if the store implements loadCache method only.
If this is the " +
+                    "case, ignore this warning. Otherwise, fix the configuration for the
cache: " + cfg.getName(),
+                    "Persistence store is configured, but both read-through and write-through
are disabled " +
+                    "for cache: " + cfg.getName());
+            }
+
+            if (!cfg.isWriteThrough() && cfg.isWriteBehindEnabled()) {
+                U.quietAndWarn(log,
+                    "To enable write-behind mode for the cache store it's also required to
set " +
+                    "CacheConfiguration.setWriteThrough(true) property, otherwise the persistence
" +
+                    "store will be never updated. Consider fixing configuration for the cache:
" + cfg.getName(),
+                    "Write-behind mode for the cache store also requires CacheConfiguration.setWriteThrough(true)
" +
+                    "property. Fix configuration for the cache: " + cfg.getName());
+            }
         }
 
         sesLsnrs = CU.startStoreSessionListeners(cctx.kernalContext(), cfg.getCacheStoreSessionListenerFactories());
@@ -1256,4 +1268,4 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
             }
         }
     }
-}
\ No newline at end of file
+}


Mime
View raw message