You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/03/24 14:28:42 UTC

[GitHub] merlimat opened a new pull request #1291: Refactored logAndConvertStatus() to avoid allocation when debug is off

merlimat opened a new pull request #1291: Refactored logAndConvertStatus() to avoid allocation when debug is off
URL: https://github.com/apache/bookkeeper/pull/1291
 
 
   The method `logAndConvertStatus(StatusCode status, int defaultStatus, Object... extraInfo)` is being called when processing the response for each write/read request in `PerChannelBookieClient`.
   
   The logging is only done at debug level and the `extraInfo` is not used otherwise. By taking the `Object...` we're effectively taking a `Object[]` that is allocated each time, along with the boxing for ledgerId/entryId. 
   
   Refactored the code separate the logging and the status code conversion, so that we can skip the allocation when debug is off.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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