ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-5075
Date Wed, 17 May 2017 12:46:19 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5075 36b7037ab -> e1a359d3f


ignite-5075


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

Branch: refs/heads/ignite-5075
Commit: e1a359d3f3e0b9f8969f2afd39418241e90784af
Parents: 36b7037
Author: sboikov <sboikov@gridgain.com>
Authored: Wed May 17 15:46:10 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed May 17 15:46:10 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheOffheapManagerImpl.java       | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e1a359d3/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 b922a13..e185f53 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
@@ -926,7 +926,7 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                 AtomicLong size = cacheSizes.get(cacheId);
 
                 if (size == null) {
-                    AtomicLong old = cacheSizes.put(cacheId, size = new AtomicLong());
+                    AtomicLong old = cacheSizes.putIfAbsent(cacheId, size = new AtomicLong());
 
                     if (old != null)
                         size = old;
@@ -948,11 +948,6 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
                 if (size == null)
                     return;
 
-                AtomicLong old = cacheSizes.put(cacheId, size = new AtomicLong());
-
-                if (old != null)
-                    size = old;
-
                 size.decrementAndGet();
             }
         }


Mime
View raw message