Vladsz83 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_r376379912
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBean.java
 ##########
 @@ -380,23 +376,30 @@
      */
     @MXBeanDescription("Pings node with given node ID to see whether it is 
alive. " +
         "Returns whether or not node is alive.")
-    @MXBeanParametersNames(
-        "nodeId"
-    )
-    @MXBeanParametersDescriptions(
-        "String presentation of node ID. See java.util.UUID class for details."
-    )
+    @MXBeanParametersNames("nodeId")
+    @MXBeanParametersDescriptions("String presentation of node ID. See 
java.util.UUID class for details.")
     public boolean pingNode(String nodeId);
 
+    /** Activates cluster. */
+    @MXBeanDescription("Execute activation process.")
+    @MXBeanParametersNames("active")
+    public void activate();
+
+    /** Deactivates cluster. */
+    @MXBeanDescription("Execute deactivation process.")
+    @MXBeanParametersNames("force")
 
 Review comment:
   @nizhikov , please review IgniteMXBean. We have to put flag 'force' 
somewhere for the deactivation. Current choice is
   
   `IgniteMXBean#clusterState(String state) -> clusterState(String state, 
boolean force)`
   
   Usually one has to support backward compatibility of an Interface. But this 
is an JMX. I don't think it is unsafe to add single param. Otherwise we need to 
implement additional method like
   
   ` clusterState(String state, boolean force)
   or
   deactivate(boolean force)`
   
   whereas the mxbean already has several methods for the cluster state:
   `
   void active(boolean active)
   boolean active()
   void clusterState(String state)
   String clusterState()
   `
   
   Don't think one more would be handy;
   
   Also, should we declare 
   `IgniteMXBean#active(boolean active)`
   deprecated too.

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