[ 
https://issues.apache.org/jira/browse/HADOOP-19922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18146005#comment-18146005
 ] 

ASF GitHub Bot commented on HADOOP-19922:
-----------------------------------------

cxzl25 commented on code in PR #8553:
URL: https://github.com/apache/hadoop/pull/8553#discussion_r4594631700


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java:
##########
@@ -2524,6 +2525,10 @@ private void checkDataLength(int dataLength) throws 
IOException {
             maxDataLength + ".  RPC came from " + getHostAddress();
         LOG.warn(error);
         throw new IOException(error);
+      } else if (warnDataLength > 0 && dataLength > warnDataLength) {
+        LOG.warn(

Review Comment:
   @slfan1989  Thanks for testing this with SASL.
   
   This is intentional. The warning is meant as an early signal before a 
request reaches ipc.maximum.data.length, and both checks live in 
checkDataLength() and compare the same value: the on-wire packet length. With 
auth-int/auth-conf, that length includes the SASL wrap overhead, so the hard 
limit already counts it too. If the warning used the decoded RPC length while 
the hard limit kept using the on-wire length, the two thresholds would be 
measured differently, and a warning would no longer reliably mean "close to the 
limit".
   
   The difference between QOP modes is only a few dozen bytes, which is 
negligible relative to the default 64 MB threshold. So I'd prefer to keep both 
checks on the same length. If it helps, I can add a note to the 
core-default.xml description saying the threshold applies to the on-wire 
request length, consistent with ipc.maximum.data.length.
   





> Add configurable warn threshold for large IPC RPC request data length
> ---------------------------------------------------------------------
>
>                 Key: HADOOP-19922
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19922
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: ipc
>            Reporter: dzcxzl
>            Priority: Minor
>              Labels: pull-request-available
>




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to