Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-11184

Log rotation can fail if FLAGS_log_filename is set with custom value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Impala 4.0.0
    • Impala 4.1.0
    • Backend
    • None
    • ghx-label-1

    Description

      There are several places where we use FLAGS_log_filename as glob pattern:

      https://github.com/apache/impala/8eeb000/master/be/src/common/logging.cc#L104  
      https://github.com/apache/impala/8eeb000/master/be/src/common/logging.cc#L340 

      If FLAGS_log_filename is not set, it will be initialized with google::ProgramInvocationShortName(), which will lead to correct behavior of DeleteOldLogs() and GetLatestCanonicalLogPath(). But if user set custom value to this flag, the glob pattern will mistakenly target the symlink instead of the actual log files. This can be a problem in minicluster where we start multiple impalad sharing the same log dir.

      We should replace them with google::ProgramInvocationShortName().

      Attachments

        Issue Links

          Activity

            People

              rizaon Riza Suminto
              rizaon Riza Suminto
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: