You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/02/26 12:44:46 UTC

ignite git commit: IGNITE-7632 Fixed NPE during IGFS metrics update - Fixes #3502.

Repository: ignite
Updated Branches:
  refs/heads/master e28f68ec4 -> 1974adc24


IGNITE-7632 Fixed NPE during IGFS metrics update - Fixes #3502.

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


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

Branch: refs/heads/master
Commit: 1974adc24f2b975118c8ed0057abd2fa7b748a7d
Parents: e28f68e
Author: Sergey Chugunov <se...@gmail.com>
Authored: Mon Feb 26 15:44:26 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Feb 26 15:44:26 2018 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheOffheapManagerImpl.java     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1974adc2/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index d6f178d..f7892af 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -1586,8 +1586,13 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
             CacheObject oldVal,
             CacheObject newVal
         ) {
+            GridCacheAdapter cache = cctx.cache();
+            if (cache == null) {
+                return;
+            }
+
             // In case we deal with IGFS cache, count updated data
-            if (cctx.cache().isIgfsDataCache() &&
+            if (cache.isIgfsDataCache() &&
                 !cctx.isNear() &&
                 ctx.kernalContext()
                     .igfsHelper()
@@ -1598,7 +1603,7 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                 int delta = newSize - oldSize;
 
                 if (delta != 0)
-                    cctx.cache().onIgfsDataSizeChanged(delta);
+                    cache.onIgfsDataSizeChanged(delta);
             }
         }