You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/02/08 00:50:55 UTC

[GitHub] [cassandra] dineshjoshi commented on a change in pull request #1357: CASSANDRA-17142: Limit the maximum hints size per host

dineshjoshi commented on a change in pull request #1357:
URL: https://github.com/apache/cassandra/pull/1357#discussion_r801178656



##########
File path: src/java/org/apache/cassandra/config/DatabaseDescriptor.java
##########
@@ -2606,6 +2606,21 @@ public static int getMaxHintWindow()
         return conf.max_hint_window_in_ms;
     }
 
+    public static void setMaxHintsSizePerHostInMb(int value)
+    {
+        conf.max_hints_size_per_host_in_mb = value;
+    }
+
+    public static int getMaxHintsSizePerHostInMb()
+    {
+        return conf.max_hints_size_per_host_in_mb;
+    }
+
+    public static long getMaxHintsSizePerHost()
+    {
+        return conf.max_hints_size_per_host_in_mb * 1024L * 1024L;

Review comment:
       Use `ByteUnit.MEBI_BYTES.toBytes()` instead of manual conversion?




-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org