ivandasch commented on a change in pull request #9044:
URL: https://github.com/apache/ignite/pull/9044#discussion_r635113405



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
##########
@@ -2385,12 +2388,30 @@ private void onCacheStarted(GridCacheContext cacheCtx) 
throws IgniteCheckedExcep
                 ", mode=" + cfg.getCacheMode() +
                 ", atomicity=" + cfg.getAtomicityMode() +
                 ", backups=" + cfg.getBackups() +
-                ", mvcc=" + cacheCtx.mvccEnabled() + ']');
+                ", mvcc=" + cacheCtx.mvccEnabled() +
+                (cacheCtx.expiry() != null ? ", " + 
buildExpirePolicyInfo(cacheCtx) : "") + ']');
         }
 
         return cacheCtx;
     }
 
+    /**
+     * Get formatted string with expire policy info.
+     *
+     * @param cacheCtx - grid cache context.
+     * @return formatted expire policy info.
+     */
+    private String buildExpirePolicyInfo(GridCacheContext cacheCtx) {
+        ExpiryPolicy expPlc = cacheCtx.expiry();
+
+        Duration dur = expPlc.getExpiryForCreation() != null ? 
expPlc.getExpiryForCreation() :

Review comment:
       Sorry, I suppose issue is not here.
   You should not log expiry policy like here.
   Expiry policy contains 3 fields and all of them can be used.
   
   So you must log all durations of expiry policy. I suggests log -1 if 
duration is null
   




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to