You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Peter Somogyi (Jira)" <ji...@apache.org> on 2019/09/18 17:44:00 UTC
[jira] [Commented] (HBASE-23047) ChecksumUtil.validateChecksum logs
an INFO message inside a "if(LOG.isTraceEnabled())" block.
[ https://issues.apache.org/jira/browse/HBASE-23047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16932705#comment-16932705 ]
Peter Somogyi commented on HBASE-23047:
---------------------------------------
nit: please use the same indentation level
> ChecksumUtil.validateChecksum logs an INFO message inside a "if(LOG.isTraceEnabled())" block.
> ---------------------------------------------------------------------------------------------
>
> Key: HBASE-23047
> URL: https://issues.apache.org/jira/browse/HBASE-23047
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 3.0.0, 2.3.0, 2.2.1, 2.1.6
> Reporter: Wellington Chevreuil
> Assignee: Wellington Chevreuil
> Priority: Minor
> Attachments: HBASE-23047.master.001.patch
>
>
> Noticed this while analysing another potential checksum issue. Despite doing a check for TRACE level, we log an INFO message inside the if block:
> {noformat}
> if (LOG.isTraceEnabled()) {
> LOG.info("dataLength=" + buf.capacity() + ", sizeWithHeader=" + onDiskDataSizeWithHeader
> + ", checksumType=" + ctype.getName() + ", file=" + pathName + ", offset=" + offset
> + ", headerSize=" + hdrSize + ", bytesPerChecksum=" + bytesPerChecksum);
> }
> {noformat}
> Uploading a patch that logs a TRACE message and switch to parameterising logging. Since there's no extra computation on the param passing, we shouldn't need the extra if either.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)