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/18 10:36:27 UTC

[GitHub] [druid] whutjs opened a new pull request #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt

whutjs opened a new pull request #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt
URL: https://github.com/apache/druid/pull/9723
 
 
   ### Description
   
   In the `FileWriteOutBytes#writeInt(int)` method, the argument passed to `flushIfNeeded()` is `Integer.SIZE` while the `Integer.BYTES` should be used.  
   
   **Problem**
   This bug will incur one extra file write operation in some cases.  For example, if we would like to write 4 KB of ints using `FileWriteOutBytes#writeInt(int)`, the `flush()` method will be called twice.  After fixing this bug, the `flush()` method will be called only one.
   
   
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added unit tests or modified existing tests to cover new code paths.
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `FileWriteOutBytes`
    * `FileWriteOutBytesTest`
   

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


With regards,
Apache Git Services

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


[GitHub] [druid] viongpanzi commented on issue #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt

Posted by GitBox <gi...@apache.org>.
viongpanzi commented on issue #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt
URL: https://github.com/apache/druid/pull/9723#issuecomment-615873123
 
 
   We found this problem too and fix it in the pr #9722. If this pr is merged, I will change my commit.

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


With regards,
Apache Git Services

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


[GitHub] [druid] asdf2014 commented on issue #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt

Posted by GitBox <gi...@apache.org>.
asdf2014 commented on issue #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt
URL: https://github.com/apache/druid/pull/9723#issuecomment-615848599
 
 
   @whutjs Please add a ASF license header to pass the CI.

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


With regards,
Apache Git Services

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


[GitHub] [druid] viongpanzi edited a comment on issue #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt

Posted by GitBox <gi...@apache.org>.
viongpanzi edited a comment on issue #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt
URL: https://github.com/apache/druid/pull/9723#issuecomment-615873123
 
 
   We found this problem too and fix it in the pr #9722. After this pr is merged, I will change my commit.

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


With regards,
Apache Git Services

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


[GitHub] [druid] asdf2014 merged pull request #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt

Posted by GitBox <gi...@apache.org>.
asdf2014 merged pull request #9723: Fix misuse of Integer.SIZE in FileWriteOutBytes.writeInt
URL: https://github.com/apache/druid/pull/9723
 
 
   

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


With regards,
Apache Git Services

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