ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [14/50] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-2.1.2
Date Tue, 04 Jul 2017 10:02:20 GMT
Merge remote-tracking branch 'remotes/origin/master' into ignite-2.1.2

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
#	modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java


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

Branch: refs/heads/master
Commit: fd09d301b14a2e20774503359bcef4280a67da92
Parents: a9db2ad
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Jun 27 12:27:45 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Jun 27 12:27:45 2017 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheOffheapManagerImpl.java    | 38 ++++++++++----------
 1 file changed, 20 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fd09d301/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 d64d19c..b51fc10 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
@@ -447,31 +447,33 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager
     @Override public void clearCache(GridCacheContext cctx, boolean readers) {
         GridCacheVersion obsoleteVer = null;
 
-        try (GridCloseableIterator<CacheDataRow> it = grp.isLocal() ?iterator(cctx.cacheId(),
cacheDataStores().iterator()):
-evictionSafeIterator(cctx.cacheId(), cacheDataStores().iterator())) {
-        while (it.hasNext()) {
-            cctx.shared().database().checkpointReadLock();
+        try (GridCloseableIterator<CacheDataRow> it = grp.isLocal() ? iterator(cctx.cacheId(),
cacheDataStores().iterator()) :
+            evictionSafeIterator(cctx.cacheId(), cacheDataStores().iterator())) {
+            while (it.hasNext()) {
+                cctx.shared().database().checkpointReadLock();
 
-            try {KeyCacheObject key = it.next().key();
+                try{
+                    KeyCacheObject key = it.next().key();
 
-                try {
-                    if (obsoleteVer == null)
-                        obsoleteVer = ctx.versions().next();
+                    try {
+                        if (obsoleteVer == null)
+                            obsoleteVer = ctx.versions().next();
 
-                    GridCacheEntryEx entry = cctx.cache().entryEx(key);
+                        GridCacheEntryEx entry = cctx.cache().entryEx(key);
 
-                    entry.clear(obsoleteVer, readers);
-                }
-                catch (GridDhtInvalidPartitionException ignore) {
-                    // Ignore.
+                        entry.clear(obsoleteVer, readers);
+                    }
+                    catch (GridDhtInvalidPartitionException ignore) {
+                        // Ignore.
+                    }
+                    catch (IgniteCheckedException e) {
+                        U.error(log, "Failed to clear cache entry: " + key, e);
+                    }
                 }
-                catch (IgniteCheckedException e) {
-                    U.error(log, "Failed to clear cache entry: " + key, e);
+                finally {
+                    cctx.shared().database().checkpointReadUnlock();
                 }
             }
-            finally {
-                cctx.shared().database().checkpointReadUnlock();
-            }
         }
         catch (IgniteCheckedException e) {
             U.error(log, "Failed to close iterator", e);


Mime
View raw message