You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/10/12 11:18:01 UTC

[GitHub] [druid] LakshSingla commented on a diff in pull request #13217: Add more information to exceptions occurred while writing temporary data

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


##########
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:
   From the exception, it seems like that the `writeOutBytes` is the space deficit due to which the ingestion is failing, whereas the actual deficit for the job to complete can be much more than that right?
   Should the error message omit the information `Space needed: %d` or be reworded such that the user knows that `writeOutBytes` more are required to complete the current operation (and not the ingestion)? 



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org