nizhikov commented on a change in pull request #6879: IGNITE-12197 Fixed method 
of getting value of persistent enabled in CacheGroupMetricsImpl
URL: https://github.com/apache/ignite/pull/6879#discussion_r326481885
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java
 ##########
 @@ -85,22 +85,13 @@ public CacheGroupMetricsImpl(CacheGroupContext ctx) {
 
         mreg.register("Caches", this::getCaches, List.class, null);
 
-        if (isPDSEnabled()) {
-            mreg.register("StorageSize",
-                () -> database().forGroupPageStores(ctx, PageStore::size),
-                "Storage space allocated for group, in bytes.");
+        storageSize = mreg.register("StorageSize",
+            () -> database().forGroupPageStores(ctx, PageStore::size),
 
 Review comment:
   We would have `ClassCastException` here if using 
`IgniteCacheDatabaseSharedManager` instead of `GridCacheDatabaseSharedManager`
   
   ```
       private GridCacheDatabaseSharedManager database() {
           return (GridCacheDatabaseSharedManager)ctx.shared().database();
       }
   ```
   

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


With regards,
Apache Git Services

Reply via email to