Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.6
-
None
-
None
-
Docs Required
Description
Continuous query handlers don't clean up after the cache was stopped.
Reproducer shows resource leak:
public class Reproducer extends GridCommonAbstractTest { /** */ private static final String CACHE1 = "cache1"; /** */ public void testCacheRecreate() throws Exception { IgniteEx node = startGrid(0); int hndCntr = 0; try { for (int i = 0; i < 100; i++) { IgniteCache<Integer, Integer> cache = node.createCache(CACHE1); cache.query(new ContinuousQuery<>().setLocalListener(evts -> {})); cache.destroy(); } for (Object locInfo : ((Map)U.field(node.context().continuous(), "locInfos")).values()) { GridContinuousHandler hnd = U.field(locInfo, "hnd"); if (CACHE1.equals(hnd.cacheName())) ++hndCntr; } assertEquals("No local handlers expected after cache was stopped.", 0, hndCntr); } finally { stopAllGrids(); } } }
Output:
junit.framework.AssertionFailedError: No local handlers expected after cache was stopped. Expected :0 Actual :100
Attachments
Issue Links
- relates to
-
IGNITE-8715 Problems with Closeable objects from Factory
- Resolved
-
IGNITE-10959 Memory leaks in continuous query handlers
- Resolved