ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [08/50] incubator-ignite git commit: review
Date Tue, 05 May 2015 15:26:01 GMT
review


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

Branch: refs/heads/ignite-664
Commit: 35e90b8aa7d90680625530701ba42a15d1a03808
Parents: d59e4c4
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Wed Apr 29 18:17:16 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Wed Apr 29 18:17:16 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheTtlManager.java  | 6 +++++-
 .../processors/cache/IgniteCacheEntryListenerAbstractTest.java | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/35e90b8a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
index d8af2b9..546cf57 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManager.java
@@ -73,6 +73,8 @@ public class GridCacheTtlManager extends GridCacheManagerAdapter {
      * @param entry Entry to remove.
      */
     public void removeTrackedEntry(GridCacheMapEntry entry) {
+        assert Thread.holdsLock(entry);
+
         pendingEntries.remove(new EntryWrapper(entry));
     }
 
@@ -93,7 +95,9 @@ public class GridCacheTtlManager extends GridCacheManagerAdapter {
 
         GridCacheVersion obsoleteVer = null;
 
-        int size = pendingEntries.sizex();
+        // Make sure that worker thread (e.g. sys pool) or user thread
+        // will not be trapped.
+        int size = Math.min(pendingEntries.sizex(), 1024);
 
         while (!sizeLimited || size-- > 0) {
             EntryWrapper e = pendingEntries.pollFirst();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/35e90b8a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
index 544fe6c..bb449e0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
@@ -712,7 +712,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
 
         expirePlcCache.put(key, 10);
 
-        U.sleep(500);
+        U.sleep(700);
 
         if (!eagerTtl())
             assertNull(primaryCache(key, cache.getName()).get(key)); // Provoke expire event
if eager ttl is disabled.


Mime
View raw message