cryptoe commented on code in PR #13217:
URL: https://github.com/apache/druid/pull/13217#discussion_r993411373


##########
processing/src/main/java/org/apache/druid/segment/writeout/FileWriteOutBytes.java:
##########
@@ -59,7 +60,12 @@ private void flushIfNeeded(int bytesNeeded) throws 
IOException
   public void flush() throws IOException
   {
     buffer.flip();
-    Channels.writeFully(ch, buffer);
+    try {
+      Channels.writeFully(ch, buffer);
+    }
+    catch (IOException e) {
+      throw new IOE(e, "Failed to write to file: %s. Space needed: %d", 
file.getAbsolutePath(), writeOutBytes);

Review Comment:
   I think we can't guess how much many more bytes are needed as that is 
dependent on when the user will call the close method. 
   
   



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