You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/05/19 10:25:37 UTC

[GitHub] [ignite] ivandasch commented on a change in pull request #9044: IGNITE-13810 append expire policy info into log of started cache

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



##########
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:
       Expiry policy can be null, FYI




-- 
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:
users@infra.apache.org