netudima commented on code in PR #3655:
URL: https://github.com/apache/cassandra/pull/3655#discussion_r1858948458
##########
src/java/org/apache/cassandra/transport/CQLMessageHandler.java:
##########
@@ -518,10 +533,23 @@ protected boolean
processFirstFrameOfLargeMessage(IntactFrame frame, Limit endpo
// max CQL message size defaults to 256mb, so should be safe to
downcast
int messageSize = Ints.checkedCast(header.bodySizeInBytes);
receivedBytes += buf.remaining();
+
+ if (authMessageTooBig(messageSize))
+ {
+ // we raise a fatal error and close the connection,
+ // so it does not make sense to continue frames processing
+ ClientMetrics.instance.markRequestDiscarded();
+ return false;
+ }
LargeMessage largeMessage = new LargeMessage(header);
-
- if (throwOnOverload)
+ if (messageSize > MAX_CQL_MESSAGE_SIZE)
Review Comment:
totally agree, actually I have come to the same conclusion as well and I am
already working now on such change
--
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]