zstan commented on a change in pull request #9044:
URL: https://github.com/apache/ignite/pull/9044#discussion_r694523342
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
##########
@@ -1546,6 +1551,36 @@ private long checkPoolStarvation(
EventType.EVT_NODE_JOINED, localNode());
startTimer.finishGlobalStage("Await exchange");
+
+ if (log.isInfoEnabled())
+ ackExpPlcInfoByCaches();
+ }
+
+ /**
+ * Acks expiration policy info by caches.
+ */
+ private void ackExpPlcInfoByCaches() {
+ final String r = ctx.cache().context().cacheContexts().stream()
+ .map(cacheCtx -> {
+ ExpiryPolicy expPlc = cacheCtx.expiry();
+ if (expPlc == null || expPlc instanceof
EternalExpiryPolicy) return null;
+
+ Duration dur;
+ if (expPlc.getExpiryForCreation() != null)
+ dur = expPlc.getExpiryForCreation();
+ else if (expPlc.getExpiryForUpdate() != null)
+ dur = expPlc.getExpiryForUpdate();
+ else
+ dur = expPlc.getExpiryForAccess();
+
+ if (dur == null || dur.getTimeUnit() == null) return null;
+
+ return "{cache=" + cacheCtx.name() + ", duration=" +
dur.getTimeUnit().toMillis(dur.getDurationAmount()) +
+ "ms, isEagerTtl=" +
cacheCtx.ttl().eagerTtlEnabled() + "}";
+ }).filter(s -> !Objects.isNull(s))
Review comment:
Objects.notNull more accurate here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]