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 2020/04/22 03:21:24 UTC

[GitHub] [druid] viongpanzi commented on a change in pull request #9722: Optimize FileWriteOutBytes to avoid high system cpu usage

viongpanzi commented on a change in pull request #9722:
URL: https://github.com/apache/druid/pull/9722#discussion_r412639485



##########
File path: processing/src/main/java/org/apache/druid/segment/writeout/FileWriteOutBytes.java
##########
@@ -105,8 +110,8 @@ public void write(byte[] b, int off, int len) throws IOException
   @Override
   public long size() throws IOException
   {
-    flush();
-    return ch.size();
+    flushIfNeeded(0); // To avoid check the declared IOException never thrown error

Review comment:
       Thanks for point out that. I added this line of code on purpose, or `The declared exception <code>IOException</code> is never thrown` error will block ci. And I attempt to remove `throws IOException` from method signature, but new error occurs! Do you have any suggestions?




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

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