Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-23047

ChecksumUtil.validateChecksum logs an INFO message inside a "if(LOG.isTraceEnabled())" block.

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha-1, 2.3.0, 2.2.1, 2.1.6
    • 3.0.0-alpha-1, 2.3.0, 2.2.5
    • None
    • None

    Description

      Noticed this while analysing another potential checksum issue. Despite doing a check for TRACE level, we log an INFO message inside the if block:

      if (LOG.isTraceEnabled()) {
            LOG.info("dataLength=" + buf.capacity() + ", sizeWithHeader=" + onDiskDataSizeWithHeader
                + ", checksumType=" + ctype.getName() + ", file=" + pathName + ", offset=" + offset
                + ", headerSize=" + hdrSize + ", bytesPerChecksum=" + bytesPerChecksum);
          }
      

      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.

      Attachments

        1. HBASE-23047.master.002.patch
          2 kB
          Wellington Chevreuil
        2. HBASE-23047.master.001.patch
          2 kB
          Wellington Chevreuil

        Activity

          People

            wchevreuil Wellington Chevreuil
            wchevreuil Wellington Chevreuil
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: