maedhroz commented on code in PR #3655:
URL: https://github.com/apache/cassandra/pull/3655#discussion_r1905878414
##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -822,6 +825,21 @@ else if (conf.commitlog_segment_size.toMebibytes() >= 2048)
else if (conf.commitlog_segment_size.toKibibytes() < 2 *
conf.max_mutation_size.toKibibytes())
throw new ConfigurationException("commitlog_segment_size must be
at least twice the size of max_mutation_size / 1024", false);
+ if (conf.native_transport_max_message_size == null)
+ {
+ conf.native_transport_max_message_size = new
DataStorageSpec.LongBytesBound(calculateDefaultNativeTransportMaxMessageSizeInBytes());
+ } else {
+ nativeTransportMaxMessageSizeConfiguredExplicitly = true;
+ long maxCqlMessageSize =
conf.native_transport_max_message_size.toBytes();
+ if (maxCqlMessageSize >
conf.native_transport_max_request_data_in_flight.toBytes())
+ throw new
ConfigurationException("native_transport_max_message_size must no exceed
native_transport_max_request_data_in_flight", false);
Review Comment:
```suggestion
throw new
ConfigurationException("native_transport_max_message_size must not exceed
native_transport_max_request_data_in_flight", false);
```
##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -822,6 +825,21 @@ else if (conf.commitlog_segment_size.toMebibytes() >= 2048)
else if (conf.commitlog_segment_size.toKibibytes() < 2 *
conf.max_mutation_size.toKibibytes())
throw new ConfigurationException("commitlog_segment_size must be
at least twice the size of max_mutation_size / 1024", false);
+ if (conf.native_transport_max_message_size == null)
+ {
+ conf.native_transport_max_message_size = new
DataStorageSpec.LongBytesBound(calculateDefaultNativeTransportMaxMessageSizeInBytes());
+ } else {
+ nativeTransportMaxMessageSizeConfiguredExplicitly = true;
+ long maxCqlMessageSize =
conf.native_transport_max_message_size.toBytes();
+ if (maxCqlMessageSize >
conf.native_transport_max_request_data_in_flight.toBytes())
+ throw new
ConfigurationException("native_transport_max_message_size must no exceed
native_transport_max_request_data_in_flight", false);
+
+ if (maxCqlMessageSize >
conf.native_transport_max_request_data_in_flight_per_ip.toBytes())
+ throw new
ConfigurationException("native_transport_max_message_size must no exceed
native_transport_max_request_data_in_flight_per_ip", false);
Review Comment:
```suggestion
throw new
ConfigurationException("native_transport_max_message_size must not exceed
native_transport_max_request_data_in_flight_per_ip", false);
```
--
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]