Fixed an issue that caused a deadlock when user cache was created in parallel with TTL worker was in progress. Fixes
@@ -184,6 +184,9 @@ public class GridCacheSharedTtlCleanupManager extends GridCacheSharedManagerAdap
Integer processedCacheID = mgr.getKey();
+ cctx.database().checkpointReadLock();
+
+ try {
// Need to be sure that the cache to be processed will not be unregistered and,
// therefore, stopped during the process of expiration is in progress.
mgrs.computeIfPresent(processedCacheID, (id, m) -> {
@@ -192,6 +195,10 @@ public class GridCacheSharedTtlCleanupManager extends GridCacheSharedManagerAdap
return m;
});
+ }
+ finally {
+ cctx.database().checkpointReadUnlock();
+ }
if (isCancelled())
return;
