abhishekagarwal87 commented on code in PR #14741:
URL: https://github.com/apache/druid/pull/14741#discussion_r1282981014


##########
processing/src/main/java/org/apache/druid/java/util/http/client/response/BytesFullResponseHolder.java:
##########
@@ -42,13 +43,16 @@ public BytesFullResponseHolder addChunk(byte[] chunk)
   }
 
   @Override
-  public byte[] getContent()
+  public byte[] getContent() throws BufferOverflowException
   {
-    int size = 0;
+    long size = 0L;
     for (byte[] chunk : chunks) {
       size += chunk.length;
+      if (size > Integer.MAX_VALUE) {
+        throw new BufferOverflowException();

Review Comment:
   can you please add the long size in the message? Also, if you can catch this 
exception in KillUnusedSegmentsTask, you can rethrow an exception with more 
user friendly message. 



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