maedhroz commented on code in PR #3274:
URL: https://github.com/apache/cassandra/pull/3274#discussion_r1591589788


##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -990,6 +990,15 @@ else if (conf.max_value_size.toMebibytes() >= 2048)
             throw new ConfigurationException(String.format("Invalid 
configuration. Heap dump is enabled but cannot create heap dump output path: 
%s.", conf.heap_dump_path != null ? conf.heap_dump_path : "null"));
 
         conf.sai_options.validate();
+
+        if 
(conf.native_transport_min_backoff_on_queue_overload.toMilliseconds() <= 0)
+            throw new IllegalArgumentException("Min backoff on queue overload 
should be positive");
+
+        if 
(conf.native_transport_min_backoff_on_queue_overload.toMilliseconds() >= 
conf.native_transport_max_backoff_on_queue_overload.toMilliseconds())
+            throw new IllegalArgumentException(String.format("Min backoff on 
queue overload should be strictly less than max backoff, but %s >= %s",
+                                                             
conf.native_transport_min_backoff_on_queue_overload,
+                                                             
conf.native_transport_max_backoff_on_queue_overload));
+

Review Comment:
   nit: Should these be `ConfigurationException`?
   
   nit: Should we use the actual YAML names in the error message? (ex. 
`native_transport_min_backoff_on_queue_overload`)



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