Wait for local join before start TTL cleanup worker - Fixes
@@ -130,11 +130,13 @@ public class GridCacheSharedTtlCleanupManager extends GridCacheSharedManagerAdap
Throwable err = null;
try {
+ cctx.discovery().localJoin();
+
+ assert !cctx.kernalContext().recoveryMode();
+
while (!isCancelled()) {
boolean expiredRemains = false;
- // TTL cleanup is allowed only when node joined to topology.
- if (!cctx.kernalContext().recoveryMode()) {
for (GridCacheTtlManager mgr : mgrs) {
updateHeartbeat();
@@ -144,7 +146,6 @@ public class GridCacheSharedTtlCleanupManager extends GridCacheSharedManagerAdap
if (isCancelled())
return;
}
- }
updateHeartbeat();
