Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-5383

Eliminate expensive string creation in debug log messages

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 1.2.0
    • None

    Description

      Use IntelliJ and search with regex pattern: LOG\.debug.*toString

      I found a number of bad log message practice where string objects are created or concatenated regardless log level.

      Parameters passed to slf4j debug log are supposed to be O(1).

      For example,

      KeyManagerImpl.refreshPipeline
      } catch (IOException ioEx) {
        LOG.debug("Get containerPipeline failed for {}",
            containerIDs.toString(), ioEx);
      

      Attachments

        Issue Links

          Activity

            People

              sky76093016 Keyi Song
              weichiu Wei-Chiu Chuang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: