smiklosovic commented on code in PR #4433:
URL: https://github.com/apache/cassandra/pull/4433#discussion_r2469195684


##########
src/java/org/apache/cassandra/service/GCInspector.java:
##########
@@ -407,6 +437,40 @@ public void setGcLogThresholdInMs(long threshold)
         DatabaseDescriptor.setGCLogThreshold((int) threshold);
     }
 
+    public int getGcConcurrentPhaseWarnThresholdInMs()
+    {
+        return DatabaseDescriptor.getGCConcurrentPhaseWarnThreshold();
+    }
+
+    public void setGcConcurrentPhaseWarnThresholdInMs(int threshold)
+    {
+        long gcConcurrentPhaseLogThresholdInMs = 
getGcConcurrentPhaseLogThresholdInMs();
+        if (threshold < 0)
+            throw new IllegalArgumentException("Threshold must be greater than 
or equal to 0");
+        if (threshold != 0 && threshold <= gcConcurrentPhaseLogThresholdInMs)
+            throw new IllegalArgumentException("Threshold must be greater than 
gcConcurrentPhaseLogThresholdInMs which is currently "
+                                               + 
gcConcurrentPhaseLogThresholdInMs);
+        DatabaseDescriptor.setGCConcurrentPhaseWarnThreshold(threshold);
+    }
+
+    public int getGcConcurrentPhaseLogThresholdInMs()
+    {
+        return DatabaseDescriptor.getGCConcurrentPhaseLogThreshold();
+    }
+
+    public void setGcConcurrentPhaseLogThresholdInMs(int threshold)

Review Comment:
   also as I understand it .... what happens when you put into yaml logically 
invalid values and you start the node? because the validation occurs only when 
you call mbean methods. If we want to be sure that what we started the node 
with makes sense already then it would need to be validated in 
DatabaseDesciptor.applySimpleConfig that is called as part of node startup and 
validated there so we are sure it is all valid already



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to