nizhikov commented on a change in pull request #7358: IGNITE-12614 : Disallow 
silent deactivation of cluster to prevent in-mem data loss.
URL: https://github.com/apache/ignite/pull/7358#discussion_r378087444
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
 ##########
 @@ -1654,6 +1659,14 @@ public boolean isBaselineAutoAdjustEnabled() {
         return distributedBaselineConfiguration.isBaselineAutoAdjustEnabled();
     }
 
+    /**
+     * @return {@code False} if cluster deactivation can erase user's data and 
objects.
+     * {@code True} If deactivation is safe.
+     */
+    public boolean isDeactivationSafe() {
 
 Review comment:
   Please, use `ctx.cache().cacheDescriptors()` here and remove 
`GridCacheProcessor#inMemoryCaches` method.
   
   ```
           return ctx.cache().cacheDescriptors().values().stream()
               .filter(desc -> !isPersistentCache(desc.cacheConfiguration(), 
ctx.config().getDataStorageConfiguration()))
               .findFirst()
               .isPresent();
   ```

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


With regards,
Apache Git Services

Reply via email to