zentol commented on code in PR #23229:
URL: https://github.com/apache/flink/pull/23229#discussion_r1297239508


##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/FileUploadHandler.java:
##########
@@ -212,6 +212,16 @@ protected void channelRead0(final ChannelHandlerContext 
ctx, final HttpObject ms
         }
     }
 
+    private static boolean hasNext(HttpPostRequestDecoder decoder) {
+        try {
+            return decoder.hasNext();
+        } catch (HttpPostRequestDecoder.EndOfDataDecoderException e) {
+            // this can occur if the final chuck wasn't empty, but didn't 
contain any attribute data
+            // unfortunately the Netty APIs don't give us any way to check this

Review Comment:
   > we could maintain the size of 
currentHttpPostRequestDecoder.getBodyHttpDatas() 
   
   You can only call `getBodyHttpDatas` once you've read everything.
   
   



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

Reply via email to