ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] nizhikov commented on a change in pull request #6738: IGNITE-12027 NPE on try to read the MinimumNumberOfPartitionCopies metric.
Date Wed, 11 Sep 2019 13:27:11 GMT
nizhikov commented on a change in pull request #6738: IGNITE-12027 NPE on try to read the MinimumNumberOfPartitionCopies
metric.
URL: https://github.com/apache/ignite/pull/6738#discussion_r323239575
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsImpl.java
 ##########
 @@ -444,11 +472,25 @@ public void remove() {
      * @return Database.
      */
     private GridCacheDatabaseSharedManager database() {
+        if (!(ctx.shared().database() instanceof GridCacheDatabaseSharedManager))
+            return null;
+
         return (GridCacheDatabaseSharedManager)ctx.shared().database();
     }
 
     /** @return Metric group name. */
     private String metricGroupName() {
         return metricName(CACHE_GROUP_METRICS_PREFIX, ctx.cacheOrGroupName());
     }
+
+    /** @return {@code True} if topology started. */
+    private boolean isTopologyStarted() {
 
 Review comment:
   We should implement this method different.
   Let's add to the `CacheGroupContext` following method:
   ```
       public boolean isTopologyStarted() {
           return top == 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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message